GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 09-Apr-2004, 02:46
surgio surgio is offline
New Member
 
Join Date: Apr 2004
Posts: 5
surgio will become famous soon enough

Visual C++ Edge Detection


Hi All,

I'm doing a project based mainly on edge/object detection but I have no idea how to get the video input into a manipulable(?) form. I'm using Visual C++ and I know if I have to manipulate the image, I first need to display it. I do have some video software that records and takes pictures but I can't do any image smoothing or object detection with it.

I think I just need to know how to get started because I run Visual C++ and say "ok, need to display video from camera", but don't know how.. haha.

Thanks in advance.

-surgio
  #2  
Old 09-Apr-2004, 03:54
Max Payne's Avatar
Max Payne Max Payne is offline
Regular Member
 
Join Date: Apr 2004
Location: 3° 08 North 101° 42 East
Posts: 332
Max Payne is a jewel in the roughMax Payne is a jewel in the roughMax Payne is a jewel in the rough
Can't give any advise since i never done image manipulation befor, but there is a lib that could be useful.. try http://www.paintlib.de/paintlib/

with this lib, u can load any image type and manipulate it before saving. I'm not sure if it supports edge detection, but it has filtering function and ithink you can define your own edge detection function.Hope it helps.
__________________
When you say "I wrote a program that crashed Windows," people just stare at you blankly and say "Hey, I got those with the system, for free." Linus Torvalds
  #3  
Old 05-Oct-2004, 07:13
Bhushan Kalse Bhushan Kalse is offline
New Member
 
Join Date: Oct 2004
Posts: 1
Bhushan Kalse is on a distinguished road
Hi,
I know, I m little late to reply ) coz I recently joined this forum.
But still if anybody is looking for video capture or image processing, please go thru 'Video Capture Macros' documentation in MSDN. It has all that one need to capture and process image from simple web camera.

I can tell more, if anybody interested !!
~Bhsuhan.
  #4  
Old 05-Oct-2004, 07:36
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Hello Bushan,

We always welcome replies to existing threads with relevant info. Many others will find this thread, and they may not always be logged in to ask you for more details. So, please post any details you can share...
  #5  
Old 15-Oct-2004, 17:26
Daniel Apostol Daniel Apostol is offline
New Member
 
Join Date: Oct 2004
Posts: 1
Daniel Apostol is on a distinguished road
Hello. I did a similar project 4 months ago. I had to use 2 web cams (stereo image) insted of one so sync was required...Even so...u coul use DirectX DShow ...if u're web cam support WDM drivers all u have to do is get used to using filters. Everithing will be more simple.(PS: u will require direct x SDK )
eg:

CPP / C++ / C Code:
HRESULT CWebCam::grabFrames(void)
{
	HRESULT hr;

	if (close) return E_FAIL;

	pMediaControl->Pause();

	delete pBufferLeft;
	delete pBufferRight;

	hr = pGrabberLeft->GetCurrentBuffer(&cbBufferLeft, NULL);
	while (cbBufferLeft==0) 
	{	cbBufferLeft = 0;
		hr = pGrabberLeft->GetCurrentBuffer(&cbBufferLeft, NULL);
	}
	if (FAILED(hr))return hr;

	pBufferLeft = new unsigned char[cbBufferLeft];
	if (!pBufferLeft) return E_FAIL;

	hr = pGrabberLeft->GetCurrentBuffer(&cbBufferLeft, (long*)pBufferLeft);
	if (FAILED(hr)) return hr;


	hr = pGrabberRight->GetCurrentBuffer(&cbBufferRight, NULL);
	//stai pana ce bufferul intern poate fi citit
	
	pBufferRight = new unsigned char[cbBufferRight];
	if (!pBufferRight) return E_FAIL;
	hr = pGrabberRight->GetCurrentBuffer(&cbBufferRight, reinterpret_cast<long*>(pBufferRight));

	if (FAILED(hr)) return hr;
	pMediaControl->Run();

	return S_OK;
}

U could also use GDI (i didn't try it)

The result will be a buffer that u can for example store in a matrix for easy use.

Hope this was helpfull.

:-D Ou..u could use for testing graph edit
it helped me in designing testing filters
Last edited by JdS : 15-Oct-2004 at 23:16. Reason: Please insert your example C/C++ codes between [c] and [/c] tags
  #6  
Old 26-Mar-2005, 01:46
zerapio zerapio is offline
New Member
 
Join Date: Mar 2005
Posts: 1
zerapio is on a distinguished road

To Daniel


Hey Daniel, I'm also working with 2 web cameras but I'm having problems synchronizing them. Would you mind telling me how you approached this?

Thanks
-Z
 
 

Recent GIDBlogPython ebook by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Visual C++6.0 - Illegal use of this type as an expression RealmMaster C++ Forum 5 24-Aug-2006 13:51
Intel Compiler C++ for Embedded Visual C++ kiara C++ Forum 1 15-Jan-2004 09:56
Convertin C++ to eMbedded Visual C++ kiara C++ Forum 0 14-Jan-2004 01:05
Convertin C++ to eMbedded Visual C++ jbalart C++ Forum 0 23-Dec-2003 06:44
Flash Detection for JdS! BobbyDouglas Websites Reviewed Forum 3 26-Aug-2003 10:58

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 17:48.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.