Sign in to follow this  

Simple OpenCV problem.

Recommended Posts

Why I try to run the following OpenCV program, it shows the following error : ---------------------------------------------------------------------- test_1.exe - Application Error The application failed to initialize properly (0x80000003). Click on OK to terminate the application. ----------------------------------------------------------------------
#include "cv.h"
#include "highgui.h"

int main()
	IplImage *img = cvLoadImage("C:\\face.bmp");
	cvSetImageROI(img, cvRect(100,100, 100, 100));
	cvAddS(img, cvScalar(50), img);
	cvShowImage("Test", img);


	return 0;
When i press F5(im using vs2008express), the program encounters a break point...i have attached a picture...dont know, whether, it will help or not. [URL=""][/URL] It is not that, only this program is producing this error, but also any kind of image manipulation funciton containing (OpenCV)program is resulting in this sitution. Such as : cvSmooth one last thing, it there any dedicated OpenCV forum or sth like that? *Dont know, if this is the correct place to post about this topic.Plase change if it is a problem.

Share this post

Link to post
Share on other sites
I have made a little progress.

Check the program with Dependency Walker, and found out that somwhere in related with SHLWAPI.DLL and MPR.DLL a function
WNetRestoreConnectionA in causing the error, which cannt be loaded at runtime.


As far has i have seen this is a common error.But, yet havn't found a solution.

Googling answers a says,
"Turn off your compilers setting to assume you are programming for Win9x.
(I just lost which setting but it is not that difficult, use a #define...) " to do this is VS2008 express?

this simple problem is freaking me out. :@ :@

Share this post

Link to post
Share on other sites
The best way to make an OpenCv program to work is to open the entire OpenCv solution and modify a sample program.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this