# Spot in image (not homogeneous)

**URL:** <https://forums.openmv.io/t/spot-in-image-not-homogeneous/9344>\
**Category:** OpenMV Boards\
**Created:** [March 17, 2024, 8:03pm UTC](https://forums.openmv.io/t/spot-in-image-not-homogeneous/9344 "2024-03-17T20:03:56Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [April 3, 2024, 11:26pm UTC](https://forums.openmv.io/t/spot-in-image-not-homogeneous/9344/9 "2024-04-03T23:26:58Z")

</div>

@Elecios

Hi, sorry for the delay on this:

Please run this script:

```auto
# This work is licensed under the MIT license.
# Copyright (c) 2013-2023 OpenMV LLC. All rights reserved.
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# Hello World Example
#
# Welcome to the OpenMV IDE! Click on the green run arrow button below to run the script!

import sensor
import time
import image

sensor.reset() # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA) # Set frame size to QVGA (320x240)
#sensor.skip_frames(time=2000) # Wait for settings take effect.
clock = time.clock() # Create a clock object to track the FPS.

print("")

def print_reg(reg):
    print("[0x%02x]=0x%02x" % (reg, sensor.__read_reg(reg)))

print_reg(0x5000)
print_reg(0x583E)
print_reg(0x583F)
print_reg(0x5840)
print_reg(0x5841)
print_reg(0x5842)
print_reg(0x5843)
print_reg(0x5844)
print_reg(0x5845)
print_reg(0x5846)
print_reg(0x5847)
print_reg(0x5848)
print_reg(0x5849)

#sensor.__write_reg(0x583E, 0)
#sensor.__write_reg(0x583F, 0)
#sensor.__write_reg(0x5840, 0)

sensor.__write_reg(0x5000, 0x27 | 0x80)

sensor.__write_reg(0x5842, 0)
sensor.__write_reg(0x5843, 0x00)
sensor.__write_reg(0x5844, 0)
sensor.__write_reg(0x5845, 0x00)

sensor.__write_reg(0x5846, 0x1)
sensor.__write_reg(0x5847, 0x00)
sensor.__write_reg(0x5848, 0x1)
sensor.__write_reg(0x5849, 0x0)

while True:
    clock.tick() # Update the FPS clock.
    img = sensor.snapshot()
    #print(clock.fps()) # Note: OpenMV Cam runs about half as fast when connected
    # to the IDE. The FPS should increase once disconnected.

```

Please let me know if this improves performance to a point where it works for you.

I can commit this officially if it’s good.

---

_[View the full topic](https://forums.openmv.io/t/spot-in-image-not-homogeneous/9344)._
