Hello dears,
These days, I am working on reading bar code as a projects for school, since I do not have enough experience and familiarity with Opencv , I have been hanged on this projects ,but of course I did some thing to do.
Briefly, I would like to create one scan line class in opencv with c++
///////////////////////////////code //////////////////////////////
Mat cropped;
cvtColor(cropped_rgb,cropped,CV_RGB2GRAY);
// cout <<"cols " <<cropped.cols<< "\n"="" <<="" "rows"="" <<="" cropped.rows="" 2="" <<="" "\n"="" <<="" cropped.size()<<="" endl;="" lineiterator="" it(cropped,point(0,cropped.rows="" 2),point(cropped.cols,cropped.rows="" 2),8,false);="" <br="">
vector<point> points(it.count);
vector<vec3b> buf;
for(int i=0; i<it.count; i++)="" {="" buf.push_back(="" vec3b(*it)="" );="" it++;="" }="" cerr="" <<="" mat(buf)="" <<="" endl;="" line(cropped,point(0,cropped.rows="" 2),point(cropped.cols,cropped.rows="" 2),scalar(255),1);="" imshow(="" "cropped",="" cropped="" );<="" p="">
the result:
as you can see my problem is here,there is <vec3b> which is not desirable for me,just the values has been put inside the box are very important to me. So,is it possible guide me and tell me,how i should catch these values ????really appreciate it.