About :ir_beacon_grayscale_tracking. how to get a ir image?

the ir_beacon_grayscale_tracking has not tell the different between the ir image and normal image.
i got not idea without ir image.
does it means turn on the ir led and take a snap? i know that

ir_led    = LED(4)

let led4 =1, and take the photo?

Hi, you can have external IR Illuminators or from the one on the camera. You should use something external though.

# IR Beacon Grayscale Tracking Example
# This example shows off IR beacon Grayscale tracking using the OpenMV Cam.

import sensor, image, time
from pyb import LED#<----------------------change  this
thresholds = (255, 255) # thresholds for bright white light from IR.

sensor.set_framesize(sensor.FHD)#<----------------------change  this
sensor.set_windowing((240, 240)) # 240x240 center pixels of VGA
sensor.skip_frames(time = 2000)
sensor.set_auto_gain(False) # must be turned off for color tracking
sensor.set_auto_whitebal(False) # must be turned off for color tracking
clock = time.clock()

# Only blobs that with more pixels than "pixel_threshold" and more area than "area_threshold" are
# returned by "find_blobs" below. Change "pixels_threshold" and "area_threshold" if you change the
# camera resolution. "merge=True" merges all overlapping blobs in the image.
LED(4).on()##<----------------------change  this
    img = sensor.snapshot()
    for blob in img.find_blobs([thresholds], pixels_threshold=200, area_threshold=200, merge=True):
        ratio = blob.w() / blob.h()
        if (ratio >= 0.5) and (ratio <= 1.5): # filter out non-squarish blobs
            img.draw_cross(blob.cx(), blob.cy())

now i got :

win7+ide 3.03.
what wrong with my image?

1 Like

When you turn the LEDs off do you get an image?

If so, it’s because the LEDs are so powerful that they are shining through the PCB and washing out the camera sensor. This is a known problem and why we removed the IR LEDs for newer designs.

yes,turn the LEDs off , get an image

Yeah, the LEDs are just completely saturating the sensor then.

can openmv use a separator of camera or build a ir led extension board for ir image?
i think ir image is a good choice for openmv

Yeah, just use an I/O pin to control an external array of IR LEDs.

We are building a new PIR light shield which will have IR and white LEDs to make this easy. But, it is not on sale yet.

if the ir light is not in openmv board,there are many ir leds which fit for openmv on taobao.com ,i often buy something on taobao.com

i test code of ir image,find the openmv control ir led automatic。
i wander how it work?

if turn on ir led before sensor.snapshot(),and turn off ir led after sensor.snapshot(),the image will get a white bar on it。

Unless you are using the MT9V034 global shutter camera in triggered mode the camera image is asynchronous to your code as the camera is just spitting out frames all the time. It is not aligned to the LED.

roge that ,thank you

how is his InfraRed View so clear and good distance ? the IR LED that came with the 1062 that was sent to me doesnt show anywhere near as far .

The RT1062 doesn’t have IR LEDs.