Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix video stream demo image scaling, shaking and color shift #40

Merged

Conversation

nunoguedelha
Copy link
Collaborator

Fixes #39 .

- The image was trembling due to the display of the HTML element 'write-time'. This element is the image frame refresh interval oscillating between ~9 and ~11 ms, which results in a element length toggling.
- As the image has a display 'inline-block' style, it flickers along with the 'write-time' length.
- We just use a line break to avoid this effect.
Refer to issue 41.
- OpenCV library assumes the color channel order to be BGR or BGRA.
- before calling `cv::imencode()`, use `cv::cvtColor()` for converting the original
  channel order into BGR or BGRA.
- an exception is raised for non supported pixel codes.
@nunoguedelha nunoguedelha marked this pull request as ready for review April 14, 2022 02:40
@nunoguedelha nunoguedelha requested a review from traversaro April 14, 2022 02:41
@nunoguedelha
Copy link
Collaborator Author

CC @S-Dafarra @RiccardoGrieco

@nunoguedelha
Copy link
Collaborator Author

I'm still finishing an approach based on @S-Dafarra's suggestion, but it's already worth reviewing the implementation so far already discussed in the call.

Copy link
Member

@traversaro traversaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, seems ok. Not sure if you want to check if we can do just with YARP but anyhow we can always merge this and improve it later.

@nunoguedelha
Copy link
Collaborator Author

Thanks, seems ok. Not sure if you want to check if we can do just with YARP but anyhow we can always merge this and improve it later.

Thanks @traversaro , I will submit a separate PR for the improvement, as you suggested, that way it shall be easier to discuss around it and eventually discard it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stream video example fails with the Framegrabber bouncing ball
3 participants