Help with code date

I have product that has a code date on it, and if the code date is missing I need to trigger an output. What is the best library or script to use for this?

What does the code look like ? Please attach a photo.

Here is sample code date I have to use. I have the globe shutter sensor to work with this project. Product is moving at 400 packs per min
test.mp4 (73.9 KB)

Hi, 400 pictures a second is not possible to process. If you use multiple cameras what’s the minimum fps each could run at? Better techniques are available as you decrease the frame rate.

I’m sorry that was a type O on my part. It is 400 packs per min

K, that’s pretty easy. Um, if lighting is constant I’d do blob tracking. Just use canny edge detection (search int he API for it) and then use get_stats() and compare the stats of an object without a date code to one with a date code. You should see a vast difference.

Hey is the sample code I’m running and below is a video of the results I’m getting. I don’t know how to get the stat to work or better yet get a pass or fail results to then send to output pin to turn on a LED or Relay.

# Edge detection with Canny:
# This example demonstrates the Canny edge detector.
import sensor, image, time

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

clock = time.clock() # Tracks FPS.
    clock.tick() # Track elapsed milliseconds between snapshots().
    img = sensor.snapshot() # Take a picture and return the image.
    # Use Canny edge detector
    img.find_edges(image.EDGE_CANNY, threshold=(50, 80))
# Faster simpler edge detection
    #img.find_edges(image.EDGE_SIMPLE, threshold=(100, 255))
    print(clock.fps()) # Note: Your OpenMV Cam runs about half as fast while

test111.mp4 (643 KB)

That literally our example for to get you started… Did you try modifying the code and reading the API on You have to modify the examples to do explicitly what you want to do.