Hi,
I found that handy opencv library and tried to program a simple imagemodifier with it using C. When I started to compile my code I got some errors, that are a bit confusing as they doesn't seem to make sense. This is my first time when programming with netbeans and first time I'm trying to make something else than those basic calculator etc. programs. Below is the code and the errors the compiler gives:
int iscolor = -1; /* Used to load the image as it is*/
IplImage* image = 0;
/* Load Image */
image = cvLoadImage(const char* 'test.jpg', iscolor); /* line 34 */
/*Modify image*/
...
/* Save Image */
int cvSaveImage(const char* 'modified.jpg', const CvArr* image); /* line 43 */
/*End*/
Compiler errors
main.c: In function ‘main’:
main.c:34: error: expected expression before ‘const’
main.c:34:37: warning: character constant too long for its type
main.c:34: error: too few arguments to function ‘cvLoadImage’
main.c:43:33: warning: character constant too long for its type
main.c:43: error: expected ‘;’, ‘,’ or ‘)’ before '\x2e6a7067'
These errors confuses me a bit, because
- referring to opencv c reference cvLoadImage takes just two arguments.
- how come character constant is too long?
- expected expression before 'const'? hummm... I don't get this at all
expected ‘;’, ‘,’ or ‘)’ before '\x2e6a7067'... well I don't get this either
So can somebody tell me what I'm doing wrong? Any help would be nice :)