Beginner Assistance - taking aerial photos

Discussion related to "under the hood" OpenMV topics.
amsn1993
Posts: 2
Joined: Fri Nov 15, 2019 11:54 am

Beginner Assistance - taking aerial photos

Postby amsn1993 » Fri Nov 15, 2019 11:58 am

Hi, folks --

New user here, with a non-technical background.

I'd like to use the OpenMV for taking aerial images (every 30 seconds or so after launch) using a balloon rig. I know that I'll have to use an Arduino, but that's about all I know (sorry...absolute beginner).

Not sure where to start. Any suggestions on getting this going?

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

Re: Beginner Assistance - taking aerial photos

Postby kwagyeman » Fri Nov 15, 2019 12:00 pm

You don't need an Arduino. The point of the OpenMV Cam is to not have to use one to do stuff.

What do you want to do? Just take pics? If so, see the image capture program examples.in the IDE and just have the camera takes pics in a loop until it runs out of power.
Nyamekye,
amsn1993
Posts: 2
Joined: Fri Nov 15, 2019 11:54 am

Re: Beginner Assistance - taking aerial photos

Postby amsn1993 » Fri Nov 15, 2019 2:52 pm

Is there an existing code for taking images on a loop? I have a microSD card in the camera but I'm not sure if it's taking images.

I'd also like to use the FLIR that I have for this, is there an option to regularly capture images use the Lepton?

Thanks : )
User avatar
kwagyeman
Posts: 4271
Joined: Sun May 24, 2015 2:10 pm

Re: Beginner Assistance - taking aerial photos

Postby kwagyeman » Sat Nov 16, 2019 1:40 pm

Code: Select all

# Snapshot Example
#
# Note: You will need an SD card to run this example.
#
# You can use your OpenMV Cam to save image files.

import sensor, image, pyb

RED_LED_PIN = 1
BLUE_LED_PIN = 3

sensor.reset() # Initialize the camera sensor.
sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE
sensor.set_framesize(sensor.QVGA) # or sensor.QQVGA (or others)
sensor.skip_frames(time = 2000) # Let new settings take affect.

counter = 0

while True:

    pyb.LED(RED_LED_PIN).on()
    sensor.skip_frames(time = 2000) # Give the user time to get ready.
    
    pyb.LED(RED_LED_PIN).off()
    pyb.LED(BLUE_LED_PIN).on()
    
    print("You're on camera!")
    sensor.snapshot().save("example-%d.jpg" % counter) # or "example.bmp" (or others)
    
    pyb.LED(BLUE_LED_PIN).off()
    print("Done! Reset the camera to see the saved image.")

    counter += 1
This will save pictures in a loop. It waits between each capture so you know when it's safe to power the system off. Note that the file system can get corrupted if you power off the system when it's doing writes.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 10 guests