# View real time coordinates

**URL:** https://forums.openmv.io/t/view-real-time-coordinates/1545
**Category:** OpenMV Boards
**Created:** [December 18, 2019, 9:26am UTC](https://forums.openmv.io/t/view-real-time-coordinates/1545 "2019-12-18T09:26:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![GiusB](https://avatars.discourse-cdn.com/v4/letter/g/53a042/32.png) [@GiusB](https://forums.openmv.io/u/GiusB)
#### Post date: [December 18, 2019, 9:26am UTC](https://forums.openmv.io/t/view-real-time-coordinates/1545/1 "2019-12-18T09:26:54Z")

</div>

I’m using OpenMV from a week and I would view at screen in real time two point that I track and print on terminal (blob.cx(), blob.cy()).

How can I do?

This is the code:

# Single Color Code Tracking Example

import sensor, image, time, math

thresholds\_index = 0 #for green

# Color Tracking Thresholds (L Min, L Max, A Min, A Max, B Min, B Max)

# The below thresholds track in general green things.

thresholds = [(30, 100, -64, -8, -32, 32)] # generic\_green\_thresholds

sensor.reset()  
sensor.set\_pixformat(sensor.RGB565)  
sensor.set\_framesize(sensor.QVGA) #320x240  
sensor.skip\_frames(30)  
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” must be set to merge overlapping color blobs for color codes.

while(True):  
clock.tick()  
img = sensor.snapshot()  
for blob in img.find\_blobs([thresholds[thresholds\_index]], pixels\_threshold=200, area\_threshold=200, merge=True):

# These values are stable all the time.

img.draw\_rectangle(blob.rect())  
img.draw\_cross(blob.cx(), blob.cy())  
print(“x:”, blob.cx(), end=‘’)  
print(" y:", blob.cy())  
  
  
Thanks in advance!

---

<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: [December 19, 2019, 4:49pm UTC](https://forums.openmv.io/t/view-real-time-coordinates/1545/2 "2019-12-19T16:49:36Z")

</div>

Hi, are you trying to view that point on your computer or on our LCD display?
