OpenCV Display of RAW images

HI,
I have been trying to use OpenCV to display the RAW images that is taken from the camera using the nvmipp_capture_encode. However,I am facing some problem in displaying the image.
Can you please suggest a way to do this?
Thanks

Dear raghavhrishi16,

Could you upload the problem logs you encountered? Thanks.

(imageName:3670): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()
[ISCThreadFunc:183] NvMediaISCSetExposure failed
Type “h” for a list of options
-[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
nvmipp_capture_encode: …/…/src/xcb_io.c:179: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq’ failed.
Aborted (core dumped)

Dear raghavhrishi,
Did you check the opencv supported formats at https://docs.opencv.org/2.4/doc/tutorials/introduction/display_image/display_image.html

Yes.But I was able to display a .raw file.
I am trying to make it display while I get the stream from the camera as the binary is being executed and not after it is captured. I would like to know how I can display the stream in ipp_capture_encode using OpenCV.
Thanks

Dear raghavhrishi,
You want to display the encoding image(h264 or h265) comes from the ipp_capture_encode. If so, you need to convert .h264 to jpeg or any other OpenCV supported format to display.

I want to display the stream immediately as it comes from the camera. Some sort of a live stream.
I checked to find the format and it says raw.
status = pOpStreamHandlerCtx->pGetOutput((NvMediaIPPComponentOutput *)&pBufferContext->output,
pipeNum,
pThreadContext->outputNumber);
I am trying to display the stream from op_Streamer.c so that as the stream comes, OpenCV can display it.
Kindly help me with this.
Thanks

When I use OpenCV in the NvMedia Code, I get the following error:
(Display window:5347): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()

(Display window:5347): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()

(Display window:5347): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
nvmipp_capture_encode: …/…/src/xcb_io.c:179: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq’ failed.
Aborted (core dumped)

Can you please tell me how to eliminate this ?

raghavhrishi16,
I think you should share your code.