cvapi (iplimage *) cvloadimage (const char * filename, int iscolor cv_default (cv_load_image_color); you can see this line, we found that int iscolor cv_default (cv_load_image_color) does not know much about it, so I read the definition of cv_default: // highgui. h. # ifndef cv_extern_c # ifdef _ cplusplus # define cv_extern_c extern "C" # define cv_default (VAL) = Val # else # define cv_extern_c # define cv_default (VAL) # endif here we do two things. The first thing is to define extern "C ": this definition method only exists in C ++, so there is a # ifdef _ cplusplus. In C, there is no extern "C" definition method, therefore, cv_extern_c is defined as null. A function in C ++ can be a default parameter. For example, cvapi (iplimage *) cvloadimage (const char * filename, int iscolor = cv_load_image_color ); but this definition method is not available in C, so it can only be written in C cvapi (iplimage *) cvloadimage (const char * filename, int iscolor); the definition of cv_default should be clear. |