BUT, only when I try to save the cropped image (I see some green images or some images with information from some previous frame, it is random), i.e., the cropInfo in line 47 has values obtained from detections. If I try to save the entire frame, then it works perfectly!
What could be going wrong when I set cropRect to some non zero values?
Can anybody help?
EDIT: Removed the class as the link in #2 does have the exact same issue and a generic sample code.
I have a few questions and suggestions that might help all of us here.
If the crop width and height are required to have even values, why not mention it in the docs? Even when I run the 05_jpeg_encode sample from MMAPI with odd values, I get the invalid output. It will be really helpful.
What is the reason for having crop width and height to be even? Is it the underlying compression that requires it or the way MMAPI handles different buffers or something else?
This is purely a suggestion as co-incidentally, I did stumble upon the post by the same user (linked in #1) who had made another post (which has the solution, linked in #2 above). However, as my search had a keyword nvjpegencoder, the second post wouldn't appear. Maybe you guys can improve the forums by generating automatic tags that would help further narrowing down to search for issues within a specific channel. I am sure you already have a good amount of data from this forums and definitely all the resources. :)