FIR AMG8833 image rotated ?

Discussion related to "under the hood" OpenMV topics.
User avatar
kobaan
Posts: 2
Joined: Wed Dec 26, 2018 12:55 pm
Location: Munich, Germany
Contact:

FIR AMG8833 image rotated ?

Postby kobaan » Wed Dec 26, 2018 1:18 pm

Is it just me or does fir.read read the image buffer 90 degrees rotated ?

When I use the AMG8833 sensor (Adafruit breakout board) in teensy or arduino projects the buffer is read correctly oriented. (meaning the metal part of the sensor is on the left, so that you can read the silkscreen print).
But using the Thermopile example AMG8833_overlay the thermal image is rotated 90 degrees.

I did a manual rotation to the right in software, now the example works as expected.

Something else I noticed, is that I cannot power the sensor from OpenMV's Vin pin as it only shows 1.6volts when connected via USB. When I use the 3.3V pin everything is fine.
2xOpenMV-M7 / 4xPixyCMUcam5 / 4xPyboard / Siglent SDS1202XE
User avatar
kwagyeman
Posts: 2796
Joined: Sun May 24, 2015 2:10 pm

Re: FIR AMG8833 image rotated ?

Postby kwagyeman » Wed Dec 26, 2018 4:52 pm

Hi, yes, VIN doesn't output voltage, so you have to use the 3.3v pin on the OpenMV Cam. As for the sensor image rotation. Um, yeah, maybe there's a bug here. I'll check if the rotation is wrong. I think I had it right however. I've never tested with whatever the Arduino software did.
Nyamekye,
User avatar
kwagyeman
Posts: 2796
Joined: Sun May 24, 2015 2:10 pm

Re: FIR AMG8833 image rotated ?

Postby kwagyeman » Wed Dec 26, 2018 4:53 pm

Um, I can test this again tonight.
Nyamekye,
User avatar
kwagyeman
Posts: 2796
Joined: Sun May 24, 2015 2:10 pm

Re: FIR AMG8833 image rotated ?

Postby kwagyeman » Thu Dec 27, 2018 1:23 am

I agree the rotation is wrong. It looks like the image is flipped either. The issue is right here: https://github.com/openmv/openmv/blob/m ... fir.c#L563. Just need to change how this loop works. Or this loop: https://github.com/openmv/openmv/blob/m ... fir.c#L549.
Nyamekye,
User avatar
kwagyeman
Posts: 2796
Joined: Sun May 24, 2015 2:10 pm

Re: FIR AMG8833 image rotated ?

Postby kwagyeman » Thu Dec 27, 2018 1:24 am

Um, please create a bug tracker on GitHub or send a PR to fix the issue. It looks like a rotation + image flip issue.
Nyamekye,
User avatar
kobaan
Posts: 2
Joined: Wed Dec 26, 2018 12:55 pm
Location: Munich, Germany
Contact:

Re: FIR AMG8833 image rotated ?

Postby kobaan » Sat Dec 29, 2018 7:03 am

Github issue created: https://github.com/openmv/openmv/issues/421
image is not flipped only needs a 90 degree clockwise rotation, unfortunately I'm not that good in micropython to fix this with a smart piece of code, I did a plain stupid copy&reassign of 64 values.
2xOpenMV-M7 / 4xPixyCMUcam5 / 4xPyboard / Siglent SDS1202XE

Return to “Technical Discussion”

Who is online

Users browsing this forum: Bing [Bot] and 4 guests