C++ - Could use a little explanation of Vec3b in OpenCV -


i ran 'vec3b green(0,255,0), blue (255,0,0);' in code i'm converting language. i'm new c++ opencv , wondering in documentation, searched everywhere , couldn't find it. grepped entire opencv directory , found closest definition of

'typedef vec3b rgb;'

in /home/w/documents/opencv-master/modules/imgproc/test/test_cvtyuv.cpp file

i grepped rgb , couldn't find definition on either though there alot of output on , may have missed something. i'm writing c wrapper why need know, far have wrap above 'vec3b green(0,255,0)':

 vec3b cv_create_vec3b(const char* color, int val1, int val2, int val3) {      return new vec3b color (val1, val2, val3);  } 

but gets error:

 opencv_generated.cpp:8:22: error: expected ‘;’ before ‘color’       return new vec3b color (val1, val2, val3);                   ^ opencv_generated.cpp:8:45: error: ‘color’ cannot used function      return new vec3b color (val1, val2, val3); 

i, first of all, use help, find out how type "color" . needs variable "green" or "blue" whatever input when ran(new c++ kind of)..second if point me or tell me info on or show me declaration on i'd have enough info write wrapper i'd grateful.

thank ^

i found how n s.o. post. pls see comments

here https://stackoverflow.com/questions/22311634/c-help-writing-function-parameters-for-c-wrappers-for-c

vec3b* cv_create_vec3b(int val1, int val2, int val3) {    return new vec3b (val1, val2, val3); } 

Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -