very important, how can i run this in visual c++

Hi Experts

Please answer this question

i'm new to Visual C++, " i don't now any thing about this language"

i was searching on the internet for simulating for human body project code, then i found this website please check the link

which contain the full code which writtin in visual c++
i read the article, and i found that the author said to run this project you have to download the open cv vrom sourceforge
check the site here

i download the sourch code and i downloaded the open cv library
and i have a usb web camera and i have visual c++ programming language

but the problem i don't know how to use visual c++ and the open cv library, so i can't run the code

i need to implement this code for my graduating project.

please expert i need a detailed steps about how to run this program,  i don't have time to learn visual c++ on this time

please write the answer in details

Who is Participating?
You cannot do it with Beta4 of OpenCV without patches to files in  The OpenCV library has apparently changed since the hbp project was written and it is no longer compatible.  I went back to Beta3 and it builds OK.  Here's what I did:

1) Unzip into a project directory.

2) install Beta3 of OpenCV (  3.1 may also work, but I didn't try it.

3) Open Visual C++ 6.0 and load the "hbp.dsw" file (use File->Open Workspace) and browse the folder where you installed hbp project.  You will find the dsw file in  "<your dir>\Develop\hbp" where <your dir> is where you unzipped in step 1.

4) Right click on "hbp Files" on the FileView tab in VC++ and select "Settings..."

5) In the Settings dialog, go to the C/C++ tab and select the "Preprocessor" category in the dropdown.  In the "Additional include directories:" box, add "<OpenCV install dir>/cv/include;<OpenCV install dir>/cvaux/include".  Do this for both the Debug and Release settings (dropdown in upper left of dialog)

6) Also in Settings dialog, go to the Link tab and select the "Input" category in the right hand dropdown.  In the "Additional library path:" box, type "<OpenCV install dir>/lib" and then select the General category and in "Object/library modules:" add "cv.lib cvaux.lib".  Do step 6 for both Debig and Release settings like step 5.

7) Right click "hbp Files" and select "Build".  You should be good to go.

Hmm.  Looking at that, it appears that you dont need to build the VC++ project.  That is just for the DLL, and the DLL (hbp.dll) is already included in the zip.

It would hence appear that to run the exe that you see on the first page you link to you just need to build the front end VB app.  For this you need Visual Basic.  I take it that this uses the hbp.dll built in VC++.
...hence you don't need OpenCV at all.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

By golly your are right.  The dll is in there.  Well if you WERE to rebuild... :)
But you DO need OpenCV, and the correct version, because there are two dlls that are used from it.  Don't have to rebuild hbp.dll, though.
mrwad99Commented: all that the Q'ner needs to do is rebuild the VB project to get the runable exe ("runable exe" - is that a tautology ?!)
>> all that the Q'ner needs to do is rebuild the VB project to get the runable exe

And install Beta3 of OpenCV because you need cv.dll and cvaux.dll from there.  Beta4 will not work because functions were changed and dll's have diffrerent names.
firasattarAuthor Commented:

If no need for Visual C++, how can i build  it in visual basic

please tell me the steps to run exe in visual basic

firasattarAuthor Commented:
Dear drichards

i followed your steps, step by step
and when i build the hbp files
this message shows in the output    "hbp.dll - 0 error(s), 0 warning(s)"
so, it's mean there is no error

but when i tried to excute i  pressed Ctrl + F5
and a message box appear "please specify the executable file"

and there is combo box when i drop down to choose i found browse, activeX control test container and default web browser"
what i have to do? and why it shows in the out put hbp.dll
and how can i run the program as exe?

you gave me a reight steps, but in the end, it didn't run, how can i run th eprogram?

please advice?
*You cannot run a DLL*.

You need to build the Visual Basic project in order to run the program that you see in the example screenshots.  There was never a need to use VC++ since the DLL is already built.

Open up VB and run the project that is in the VB GRAB directory.  There is also an exe already in the zip; running that brings up something but maybe you will know more about it...

>> Open up VB and run the project that is in the VB GRAB directory.  There is also an exe already in the zip;
>>  running that brings up something but maybe you will know more about it...

Yes, which executable are you wanting to run?  There's the "prjFaceMemory.exe" in the zip and you can build "prjVBgrab.exe" from the VBGrab project.

If you need to build VBGrab and your path to the hbp stuff is not "C:\Develop\hbp\...", you will want to change "basWinAPI.bas".  Change all the "Declare ..." statements that refer to hbp.dll to eliminate the path info - just use "hbp.dll".  Example:
        Declare Sub RChbp_update Lib "hbp.DLL" (ByVal cameraIndex As Long, ByRef bmp() As Byte, ByVal width As Long, ByVal height As Long, ByRef NoOfSegments As Long)

Then copy hcp.dll, cv.dll, and cvaux.dll (the last two are from OpenCV) into the directory with the VB executable.  You may want to make these changes to the VBGrab project anyway as it makes it easier to move around.
firasattarAuthor Commented:
dear drichards & mrwad99

thank you very much
it's ok now
in visual c++ i build the hbp.dll
and i opened the "prjVBgrab.exe"

but i have a problem

when you run the "prjVBgrab.exe" click file /camera device
then a combo box screen asking "choose the DirectShow filter for your camera
i selected "Video Blaster WebCam Go Plus(WDM)"
Then when i pressed start this error appeared

"frmQuickCamStereo/CameraPreview/429/ActiveX compnent can't create object"
what is this error mean, and how can i run the application?

i thing i got the answer for the first question and i asked another question here, shall i close the question and open a new question with today question? and how can i increase the points to 1000 point (i know that it limited between 20-500)

and another point "i have a creative web camer old one" with USB 1, is't good for this application


>> what is this error mean, and how can i run the application?
Looks like there is probably a COM component that needs to be registered.  I am not at my machine right now so I'll check later if mrwad99 has not checked in.
>> I'll check later if mrwad99 has not checked in.

Hehe.  I like that !

>> what is this error mean...


Error messages like that are always fun.  It seems that you are missing some sort of plugin as drichards has said.  I don't have VB installed on this machine so I cannot easily get the code compiled to get the exe as you have.  Re-read the literature that came with the original zip and see if it says anything.

Regarding the last point, if your webcam does not work with this, then either you need a new webcam or a new project.  Don't go any further with the error unless you are sure that you have what is needed anyway to run all this: it would just be a waste of time.

<Waiting for further comments from drichards>
There are two dll's in the VBGrab project directory:  CapStill.dll and FSFWrap.dll.  You need to run regsvr32 on these files.

At a command line, change to the VBGrab directory and type:

regsvr32 CapStill.dll
regsvr32 FSFWrap.dll

This will get you past the immediate problem.  Don't know about your camera, though.  I don't have a camera, so I can't tell you if the program actually does anything.
firasattarAuthor Commented:
thank you i solved the problem

i installed the active x graphics component and it's working properly

ypu helped me two much, now i can study the code to create my project

i appreciate your help

Glad to help.
Thanks for this - it helped me solve a very similar problem!

(Annoyed with OpenCV for breaking the libs between versions)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.