Hi-
I am trying to crop out a certain part of an image to process.
I am able to create a region of interest, but when i try to crop out the rest of the picture, I can't seem to do it.
This is the relevant part of my code:
Code:
ROI* roi;
roi = imaqCreateROI();
imaqAddRectContour(roi,imaqMakeRect(0,0,220,640));
It is at this point I get stuck. I plan on using the imaqROIToMask function, but I can't get it to work.
This is what I am doing-
Code:
ROI* roi;
roi = imaqCreateROI();
imaqAddRectContour(roi,imaqMakeRect(0,0,220,640)); //top of image
ColorImage* origImage = camera.GetImage();
ColorImage* croppedImage;
imaqROIToMask(????????);
At the imaqROIToMask line I get errors no matter what I try to do.
Basically I just want the camera tracking/processing code to only look in a certain portion of the image. Sadly I couldn't find a "crop" function in the nivision.h library.
Thanks!