Image importing

Discussion related to "under the hood" OpenMV topics.
USER123rp
Posts: 3
Joined: Tue May 08, 2018 4:13 am

Image importing

Postby USER123rp » Tue May 08, 2018 4:19 am

IM new to Openmv IDE, Python in particular. Can someone help me??
My Image in located in desktop.



template = image.Image('C:\Users\****\Desktop\rr.jpg')

(NOTE I replaced my name with ****)

ERROR: invalid syntax

Thanks.
User avatar
kwagyeman
Posts: 1961
Joined: Sun May 24, 2015 2:10 pm

Re: Image importing

Postby kwagyeman » Wed May 09, 2018 1:14 am

Hi, please try to load an RGB565 BMP file, or in better yet, PNM or PPM files.
Nyamekye,
USER123rp
Posts: 3
Joined: Tue May 08, 2018 4:13 am

Re: Image importing

Postby USER123rp » Wed May 09, 2018 2:29 am

Still same thing after converting image, but if I remove "C:\" from path error says "Could not find path".
Could you send a full example of the image path??

Thanks!
User avatar
kwagyeman
Posts: 1961
Joined: Sun May 24, 2015 2:10 pm

Re: Image importing

Postby kwagyeman » Wed May 09, 2018 2:48 am

The image has to be on the camera.

I.e. please put the image on the SD card that is inserted into the camera. The image path is then "/folder/file.extension"
Nyamekye,
USER123rp
Posts: 3
Joined: Tue May 08, 2018 4:13 am

Re: Image importing

Postby USER123rp » Wed May 09, 2018 4:56 am

Thanks for the help!!

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 8 guests