How to mirror horizontally the image from the MLX90640 sensor?

General discussion about topics related to OpenMV.
Lucky_13
Posts: 5
Joined: Tue May 28, 2019 2:24 pm

How to mirror horizontally the image from the MLX90640 sensor?

Postby Lucky_13 » Wed Mar 04, 2020 12:31 pm

Hello! I use the MLX90640 sensor to my OpenMV and get a reflected thermal image. I use the standard example MLX90640_overlay.py from OpenMV IDE. How to mirror horizontally the image from the MLX90640 sensor?
Attachments
fdfd.jpg
fdfd.jpg (7.69 KiB) Viewed 2496 times
User avatar
kwagyeman
Posts: 3990
Joined: Sun May 24, 2015 2:10 pm

Re: How to mirror horizontally the image from the MLX90640 sensor?

Postby kwagyeman » Wed Mar 04, 2020 12:43 pm

Use the snapshot() method to get the thermal image from the sensor. Then use set(h_mirror=True) to mirror the image and then use the draw_image() method to overlay the image using an alpha blend.
Nyamekye,
Lucky_13
Posts: 5
Joined: Tue May 28, 2019 2:24 pm

Re: How to mirror horizontally the image from the MLX90640 sensor?

Postby Lucky_13 » Wed Mar 11, 2020 12:05 pm

kwagyeman wrote:
Wed Mar 04, 2020 12:43 pm
Use the snapshot() method to get the thermal image from the sensor. Then use set(h_mirror=True) to mirror the image and then use the draw_image() method to overlay the image using an alpha blend.
I get an error "AttributeError: 'Image' object has no attribute 'set'"
Attachments
OpenMV_error1.png
User avatar
kwagyeman
Posts: 3990
Joined: Sun May 24, 2015 2:10 pm

Re: How to mirror horizontally the image from the MLX90640 sensor?

Postby kwagyeman » Thu Mar 12, 2020 2:21 am

Update your firmware.
Nyamekye,
Lucky_13
Posts: 5
Joined: Tue May 28, 2019 2:24 pm

Re: How to mirror horizontally the image from the MLX90640 sensor?

Postby Lucky_13 » Thu Mar 12, 2020 1:03 pm

kwagyeman wrote:
Thu Mar 12, 2020 2:21 am
Update your firmware.
Thanks! After the firmware upgrade, the standard example began to work correctly. And how can you compensate for the discrepancy between the optical systems of the camera and MLX90640? The contours of objects from the MLX90640 look more than they are in the image from the camera.
User avatar
kwagyeman
Posts: 3990
Joined: Sun May 24, 2015 2:10 pm

Re: How to mirror horizontally the image from the MLX90640 sensor?

Postby kwagyeman » Sat Mar 14, 2020 12:23 pm

You'd want to use the rotation correction algorithm to change the image and then combine it with the image captured in the main frame buffer.

Basically, do snapshot () with the mlx, then rotation correction(), then snapshot of the main camera, then draw with alpha blending the thermal image on the regular image.
Nyamekye,

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 10 guests