Reputation: 848
I used this function in OpenCV for extracting pixel values along a line in an image:
//Iterate through the line along which Intensity profile is required
LineIterator it(img, Point(1,1), Point(20,20), 8);
vector<Vec3b> buf;
for(int i=0; i<it.count; i++)
{
buf.push_back( Vec3b(*it) );
it++;
}
cerr << Mat(buf) << endl;
This will print all the values stored along the line.
For verifying my algorithm using MATLAB I am looking for a similar function in MATLAB.
Can someone explain how to achieve this using in MATLAB?
Upvotes: 0
Views: 175