mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Remove incompatible set_auto_whitebal call
This commit is contained in:
parent
b4a1b57f55
commit
d11908c62b
@ -14,7 +14,6 @@ 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.
|
||||
sensor.set_auto_whitebal(False) # Turn off white balance.
|
||||
|
||||
if not "temp" in os.listdir(): os.mkdir("temp") # Make a temp directory
|
||||
|
||||
|
||||
@ -18,7 +18,6 @@ sensor.reset() # Initialize the camera sensor.
|
||||
sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE
|
||||
sensor.set_framesize(sensor.QQVGA) # or sensor.QVGA (or others)
|
||||
sensor.skip_frames(time = 2000) # Let new settings take affect.
|
||||
sensor.set_auto_whitebal(False) # Turn off white balance.
|
||||
|
||||
if not "temp" in os.listdir(): os.mkdir("temp") # Make a temp directory
|
||||
|
||||
|
||||
@ -19,7 +19,6 @@ 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.
|
||||
sensor.set_auto_whitebal(False) # Turn off white balance.
|
||||
|
||||
if not "temp" in os.listdir(): os.mkdir("temp") # Make a temp directory
|
||||
|
||||
|
||||
@ -10,7 +10,6 @@ sensor.set_pixformat(sensor.GRAYSCALE)
|
||||
sensor.set_framesize(sensor.QVGA)
|
||||
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()
|
||||
|
||||
# Capture the color thresholds for whatever was in the center of the image.
|
||||
|
||||
@ -10,7 +10,6 @@ sensor.set_pixformat(sensor.RGB565)
|
||||
sensor.set_framesize(sensor.QVGA)
|
||||
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()
|
||||
|
||||
# Capture the color thresholds for whatever was in the center of the image.
|
||||
|
||||
@ -35,7 +35,6 @@ sensor.set_pixformat(sensor.GRAYSCALE) # use grayscale.
|
||||
sensor.set_framesize(sensor.QQVGA) # use QQVGA for speed.
|
||||
sensor.skip_frames(time = 2000) # Let new settings take affect.
|
||||
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() # Tracks FPS.
|
||||
|
||||
while(True):
|
||||
|
||||
@ -9,7 +9,6 @@ sensor.set_pixformat(sensor.GRAYSCALE) # or RGB565.
|
||||
sensor.set_framesize(sensor.QVGA)
|
||||
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()
|
||||
|
||||
while(True):
|
||||
|
||||
@ -9,7 +9,6 @@ sensor.set_pixformat(sensor.GRAYSCALE) # or RGB565.
|
||||
sensor.set_framesize(sensor.QVGA)
|
||||
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()
|
||||
|
||||
while(True):
|
||||
|
||||
@ -12,7 +12,6 @@ sensor.set_framesize(sensor.VGA)
|
||||
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
|
||||
|
||||
@ -12,7 +12,6 @@ sensor.set_framesize(sensor.VGA)
|
||||
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
|
||||
|
||||
@ -17,7 +17,6 @@ sensor.set_pixformat(sensor.RGB565)
|
||||
sensor.set_framesize(sensor.QVGA)
|
||||
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
|
||||
|
||||
@ -19,7 +19,6 @@ sensor.set_pixformat(sensor.RGB565)
|
||||
sensor.set_framesize(sensor.QVGA)
|
||||
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
|
||||
|
||||
@ -18,7 +18,6 @@ sensor.set_pixformat(sensor.RGB565)
|
||||
sensor.set_framesize(sensor.QVGA)
|
||||
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
|
||||
|
||||
@ -13,7 +13,6 @@ sensor.set_pixformat(sensor.GRAYSCALE)
|
||||
sensor.set_framesize(sensor.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
|
||||
|
||||
@ -17,7 +17,6 @@ sensor.set_pixformat(sensor.RGB565)
|
||||
sensor.set_framesize(sensor.QVGA)
|
||||
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
|
||||
|
||||
@ -11,7 +11,6 @@ sensor.set_framesize(sensor.VGA) # High Res!
|
||||
sensor.set_windowing((640, 80)) # V Res of 80 == less work (40 for 2X the speed).
|
||||
sensor.skip_frames(time = 2000)
|
||||
sensor.set_auto_gain(False) # must turn this off to prevent image washout...
|
||||
sensor.set_auto_whitebal(False) # must turn this off to prevent image washout...
|
||||
clock = time.clock()
|
||||
|
||||
# Barcode detection can run at the full 640x480 resolution of your OpenMV Cam's
|
||||
|
||||
@ -10,7 +10,6 @@ sensor.set_pixformat(sensor.RGB565)
|
||||
sensor.set_framesize(sensor.QVGA)
|
||||
sensor.skip_frames(time = 2000)
|
||||
sensor.set_auto_gain(False) # must turn this off to prevent image washout...
|
||||
sensor.set_auto_whitebal(False) # must turn this off to prevent image washout...
|
||||
clock = time.clock()
|
||||
|
||||
while(True):
|
||||
|
||||
@ -11,7 +11,6 @@ sensor.set_framesize(sensor.VGA)
|
||||
sensor.set_windowing((320, 240)) # 2x Zoom
|
||||
sensor.skip_frames(time = 2000)
|
||||
sensor.set_auto_gain(False) # must turn this off to prevent image washout...
|
||||
sensor.set_auto_whitebal(False) # must turn this off to prevent image washout...
|
||||
clock = time.clock()
|
||||
|
||||
while(True):
|
||||
|
||||
@ -69,7 +69,6 @@ sensor.set_pixformat(sensor.RGB565)
|
||||
sensor.set_framesize(sensor.QVGA)
|
||||
sensor.skip_frames(time = 2000)
|
||||
sensor.set_auto_gain(False)
|
||||
sensor.set_auto_whitebal(False)
|
||||
|
||||
# LED Setup
|
||||
|
||||
|
||||
@ -75,7 +75,6 @@ sensor.set_pixformat(sensor.RGB565)
|
||||
sensor.set_framesize(sensor.QVGA)
|
||||
sensor.skip_frames(time = 2000)
|
||||
sensor.set_auto_gain(False)
|
||||
sensor.set_auto_whitebal(False)
|
||||
|
||||
# LED Setup
|
||||
|
||||
|
||||
@ -69,7 +69,6 @@ sensor.set_pixformat(sensor.RGB565)
|
||||
sensor.set_framesize(sensor.QVGA)
|
||||
sensor.skip_frames(time = 2000)
|
||||
sensor.set_auto_gain(False)
|
||||
sensor.set_auto_whitebal(False)
|
||||
|
||||
# LED Setup
|
||||
|
||||
|
||||
@ -15,7 +15,6 @@ sensor.reset() # Initialize the camera sensor.
|
||||
sensor.set_pixformat(sensor.RGB565) # or sensor.RGB565
|
||||
sensor.set_framesize(sensor.QVGA) # or sensor.QQVGA (or others)
|
||||
sensor.skip_frames(time = 2000) # Let new settings take affect.
|
||||
sensor.set_auto_whitebal(False) # Turn off white balance.
|
||||
clock = time.clock() # Tracks FPS.
|
||||
|
||||
# Take from the main frame buffer's RAM to allocate a second frame buffer.
|
||||
|
||||
@ -12,7 +12,6 @@ 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.
|
||||
sensor.set_auto_whitebal(False) # Turn off white balance.
|
||||
clock = time.clock() # Tracks FPS.
|
||||
|
||||
# Take from the main frame buffer's RAM to allocate a second frame buffer.
|
||||
|
||||
@ -13,7 +13,6 @@ sensor.set_framesize(sensor.QQVGA) # or sensor.QVGA (or others)
|
||||
if sensor.get_id() == sensor.OV7725: # Reduce sensor PLL from 6x to 4x.
|
||||
sensor.__write_reg(0x0D, (sensor.__read_reg(0x0D) & 0x3F) | 0x40)
|
||||
sensor.skip_frames(time = 2000) # Let new settings take affect.
|
||||
sensor.set_auto_whitebal(False) # Turn off white balance.
|
||||
sensor.set_auto_gain(False) # Turn this off too.
|
||||
clock = time.clock() # Tracks FPS.
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@ 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.
|
||||
sensor.set_auto_whitebal(False) # Turn off white balance.
|
||||
clock = time.clock() # Tracks FPS.
|
||||
|
||||
# Take from the main frame buffer's RAM to allocate a second frame buffer.
|
||||
|
||||
@ -17,7 +17,6 @@ sensor.reset() # Initialize the camera sensor.
|
||||
sensor.set_pixformat(sensor.RGB565) # or sensor.RGB565
|
||||
sensor.set_framesize(sensor.QVGA) # or sensor.QQVGA (or others)
|
||||
sensor.skip_frames(time = 2000) # Let new settings take affect.
|
||||
sensor.set_auto_whitebal(False) # Turn off white balance.
|
||||
clock = time.clock() # Tracks FPS.
|
||||
|
||||
if not "temp" in os.listdir(): os.mkdir("temp") # Make a temp directory
|
||||
|
||||
@ -14,7 +14,6 @@ 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.
|
||||
sensor.set_auto_whitebal(False) # Turn off white balance.
|
||||
clock = time.clock() # Tracks FPS.
|
||||
|
||||
if not "temp" in os.listdir(): os.mkdir("temp") # Make a temp directory
|
||||
|
||||
@ -15,7 +15,6 @@ sensor.set_framesize(sensor.QQVGA) # or sensor.QVGA (or others)
|
||||
if sensor.get_id() == sensor.OV7725: # Reduce sensor PLL from 6x to 4x.
|
||||
sensor.__write_reg(0x0D, (sensor.__read_reg(0x0D) & 0x3F) | 0x40)
|
||||
sensor.skip_frames(time = 2000) # Let new settings take affect.
|
||||
sensor.set_auto_whitebal(False) # Turn off white balance.
|
||||
sensor.set_auto_gain(False) # Turn this off too.
|
||||
clock = time.clock() # Tracks FPS.
|
||||
|
||||
|
||||
@ -16,7 +16,6 @@ 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.
|
||||
sensor.set_auto_whitebal(False) # Turn off white balance.
|
||||
clock = time.clock() # Tracks FPS.
|
||||
|
||||
if not "temp" in os.listdir(): os.mkdir("temp") # Make a temp directory
|
||||
|
||||
@ -34,7 +34,6 @@ clock = time.clock() # Create a clock object to track the FPS.
|
||||
# otherwise they will change the image gains to undo any exposure settings
|
||||
# that you put in place...
|
||||
sensor.set_auto_gain(False)
|
||||
sensor.set_auto_whitebal(False)
|
||||
# Need to let the above settings get in...
|
||||
sensor.skip_frames(time = 500)
|
||||
|
||||
|
||||
@ -26,7 +26,6 @@ clock = time.clock() # Create a clock object to track the FPS.
|
||||
#
|
||||
# Uncomment the below line with gain values you like (get them from the print out).
|
||||
#
|
||||
# sensor.set_auto_whitebal(False, rgb_gain_db = (0.0, 0.0, 0.0))
|
||||
|
||||
# Note: Putting (0.0, 0.0, 0.0) for the gain results in something close to zero
|
||||
# comming out. Do not expect the exact value going in to be equal to the value
|
||||
|
||||
@ -34,7 +34,6 @@ clock = time.clock() # Create a clock object to track the FPS.
|
||||
# otherwise they will change the image exposure to undo any gain settings
|
||||
# that you put in place...
|
||||
sensor.set_auto_exposure(False)
|
||||
sensor.set_auto_whitebal(False)
|
||||
# Need to let the above settings get in...
|
||||
sensor.skip_frames(time = 500)
|
||||
|
||||
|
||||
@ -10,7 +10,6 @@ sensor.set_pixformat(sensor.RGB565)
|
||||
sensor.set_framesize(sensor.QQVGA) # we run out of memory if the resolution is much bigger...
|
||||
sensor.skip_frames(time = 2000)
|
||||
sensor.set_auto_gain(False) # must turn this off to prevent image washout...
|
||||
sensor.set_auto_whitebal(False) # must turn this off to prevent image washout...
|
||||
clock = time.clock()
|
||||
|
||||
# Note! Unlike find_qrcodes the find_apriltags method does not need lens correction on the image to work.
|
||||
|
||||
@ -10,7 +10,6 @@ sensor.set_pixformat(sensor.RGB565)
|
||||
sensor.set_framesize(sensor.QQVGA) # we run out of memory if the resolution is much bigger...
|
||||
sensor.skip_frames(time = 2000)
|
||||
sensor.set_auto_gain(False) # must turn this off to prevent image washout...
|
||||
sensor.set_auto_whitebal(False) # must turn this off to prevent image washout...
|
||||
clock = time.clock()
|
||||
|
||||
# Note! Unlike find_qrcodes the find_apriltags method does not need lens correction on the image to work.
|
||||
|
||||
@ -14,7 +14,6 @@ elif omv.board_type() == "M7": sensor.set_windowing((200, 200))
|
||||
else: raise Exception("You need a more powerful OpenMV Cam to run this script")
|
||||
sensor.skip_frames(time = 2000)
|
||||
sensor.set_auto_gain(False) # must turn this off to prevent image washout...
|
||||
sensor.set_auto_whitebal(False) # must turn this off to prevent image washout...
|
||||
clock = time.clock()
|
||||
|
||||
# Note! Unlike find_qrcodes the find_apriltags method does not need lens correction on the image to work.
|
||||
|
||||
@ -11,7 +11,6 @@ sensor.set_framesize(sensor.VGA) # we run out of memory if the resolution is muc
|
||||
sensor.set_windowing((160, 120)) # Look at center 160x120 pixels of the VGA resolution.
|
||||
sensor.skip_frames(time = 2000)
|
||||
sensor.set_auto_gain(False) # must turn this off to prevent image washout...
|
||||
sensor.set_auto_whitebal(False) # must turn this off to prevent image washout...
|
||||
clock = time.clock()
|
||||
|
||||
# Note! Unlike find_qrcodes the find_apriltags method does not need lens correction on the image to work.
|
||||
|
||||
@ -21,7 +21,6 @@ elif omv.board_type() == "M7": sensor.set_framesize(sensor.QVGA)
|
||||
else: raise Exception("You need a more powerful OpenMV Cam to run this script")
|
||||
sensor.skip_frames(time = 200) # increase this to let the auto methods run for longer
|
||||
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()
|
||||
|
||||
# The apriltag code supports up to 6 tag families which can be processed at the same time.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user