but the image was not having colours somehow it was black and white;
Also when i am generating the input frame from the surface using opencv before doing any transformation or anything just taking the input as you can see in following image why am i getting a greenish improper frame as below?
I explained that before. The nvbufsurface on your scenario has mutiple planes. You cannot just use the addr[0] channel. You can refer to our FAQ to learn how to get the NV12 on jetson.
You’d better learn some basic structure of the NvBufSurface.
thanks for your help, by using your given sample code i obtained the input frame from the surface then i created an intermediate surface to copy the input frame and perform modifications now i have my modified image which is in RGBA format and i want to give that image as input to my SGIE…so how can i do that?
Also the original input frame was 1920x1080 and my current frame is only 128x128 as my model needs a specific region of full frame to perform inference.
Also I have one additional question , actually i am performing warpaffine operation on my input frame in the preprocess part and after the model inference i need the pre-processed image and the transformation matrix used there to perform inverse warpaffine in the post-processing step so how can i retrieve both of them the pre-processed image and the transformation matrix used to perform the warpaffine?
so please can you answer my both of the above queries