google-coral / example-object-tracker

Apache License 2.0
105 stars 32 forks source link

Colour-space displaying incorrectly #10

Open timayy opened 3 years ago

timayy commented 3 years ago

I seem to get inverted colours when using this with some cameras (i.e. classic purple skin look).

I've attempted adjusting the sink caps (BGR) in the GStreamer video convert and also tried adjusting the v412 driver's pixel format (v4l2-ctl -v pixelformat=UYVY or v4l2-ctl -v pixelformat=RGB3) - but no luck.

Opening a regular GStreamer sink displays correctly coloured video - i.e. gst-launch-1.0 v4l2src ! "video/x-raw,framerate=30/1,format=UYVY" ! v4l2h264enc extra-controls="controls,h264_profile=4,h264_level=10,video_bitrate=256000;" ! video/x-h264,profile=high ! h264parse ! queue ! matroskamux ! filesink location=foo.mkv

Anyone else had this issue?

manoj7410 commented 3 years ago

@timayy On which platform are you seeing this issue ? Dev board or on some other machine ?

timayy commented 3 years ago

@manoj7410 I think this will happen regardless of platform. It depends on the format of the connected camera I believe. It can be fixed by specifying the incoming format in SRC_CAPS of the pipeline building function - i.e. '...format={gst_format_here}'.

I have another question too. Is it possible to run detect.py without a monitor connected, and without having to change ximagesink to fakesink? For example; if a monitor was connected while detect.py was already running, the screen would show the python GI GUI working as normal.