Incorrect image encoding from ROS and Raspicam

5 visualizaciones (últimos 30 días)
Sebastian Wachol
Sebastian Wachol el 28 de Feb. de 2022
Respondida: Josh Chen el 5 de Ag. de 2022
Hello everyone,
I'm working about estimate position from apriltag and i need some help with image viewer from ROS and raspicam.
After update Matlab version from 20a to 21b, I got only black screen. VariableSize property from encoding arrey to rgb (1280x960x3). ErrorCode from ReadImage point out 1..." Incorrect image encoding"
Maybe sameone had the same bug and know the solution.
PS. In version 20a, the same path works fine.
  3 comentarios
yanqi liu
yanqi liu el 1 de Mzo. de 2022
may be use reshape to check,such as 32000*1777=56864000
Sebastian Wachol
Sebastian Wachol el 1 de Mzo. de 2022
I saw also, that image message status is not okey for a while, another problem. Maybe it could be a hardware problem?
I tried with 56864000 or 3686400
Thanks a lot for help good guys.

Iniciar sesión para comentar.

Respuestas (1)

Josh Chen
Josh Chen el 5 de Ag. de 2022
Hello Sebasian,
Could you elaborate about what you mean by "VariableSize property from encoding arrey to rgb (1280x960x3)"? I am not sure if I understanding this description correctly. Do you mean you updated the VariableSize property (maximum length) of the "Encoding" field? This field is basically saying the maximum length you expect the "encoding" field to be. You can use the same value as you previously have in 20a.
As for "incorrect image encoding", I think this is talking about the actual "Encoding" field in the message does not match with the "Image encoding" defined in the block mask. If you are trying to read another Image or CompressedImage message from a different source, you would probably need to update the block mask "Image encoding" to match the new message.
For the message status, since this is a one time setup, could you try to re-publish one message from the hardware and see if it gets updated? Another way of verifying whether this is a hardware problem is to create a subscriber on either MATLAB or Simulink and see if you can get the latest message from the same topic.
Hope this helps,
Josh

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by