When running the stream video example and streaming the Framegrabber "bouncing" ball or the scrolling "line", we can clearly see that the RGB colors are swapped from RGB to BGR.
By using the bouncing ball mode (option --mode ball) and change the code section https://github.com/robotology/yarp/blob/82bcafc792ba9b32aad771f7f5d6f3c52ba5fbbe/src/devices/fakeFrameGrabber/FakeFrameGrabber.cpp#L434-L442 for drawing 3 RGB circles instead of two
case VOCAB_BALL:
{
if (have_bg) {
image.copy(background);
} else {
image.zero();
}
addCircle(image,PixelRgb{255,0,0},bx,by,22);
addCircle(image,PixelRgb{0,255,0},bx,by,15);
addCircle(image,PixelRgb{0,0,255},bx,by,8);
we can check the color order used on the receiver side to be BGR:
- Run the
fakeFrameGrabber
yarpdev --file fakeFrameGrabber_basic.ini --mode ball --name /icubSim/camLeftEye
fakeFrameGrabber_basic.ini:
device fakeFrameGrabber
width 640
height 480
period 10
syncro 1
- Connect the the output port to a
yarpview device.
- Run the Open-MCT visualizer.
Originally posted by @nunoguedelha in ami-iit/yarp-openmct#101 (comment)
When running the stream video example and streaming the Framegrabber "bouncing" ball or the scrolling "line", we can clearly see that the RGB colors are swapped from RGB to BGR.
Originally posted by @nunoguedelha in ami-iit/yarp-openmct#101 (comment)