I running into problems with my openCv IplImage cropping. Assuming both tmp and img are IplImage* . Using the code:
printf(\"Orig dimensions: %dx%d\\n\", im
Image cropping using OpenCV
Mat image=imread("image.png",1); int startX=200,startY=200,width=100,height=100 Mat ROI(image, Rect(startX,startY,width,height)); Mat croppedImage; // Copy the data into new matrix ROI.copyTo(croppedImage); imwrite("newImage.png",croppedImage);