I am trying to save an image from OpenCV on my mac and I am using the following code and so far it has not been working.
cv::imwrite(\"/Users/nickporter/Desk
OpenCV does have problems in saving to JPG
images sometimes, try to save to BMP
instead:
cv::imwrite("/Users/nickporter/Desktop/Gray_Image.bmp", cvImage);
Also, before this, make sure you image cvImage
is valid. You can check it by showing the image first:
namedWindow("image", WINDOW_AUTOSIZE);
imshow("image", cvImage);
waitKey(30);