Skip to main content

Project an image centroid to another image using OpenCV

Project description


Finds the (x,y) coordinates of the centroid of an image (eg: a mobile phone camera image) pointing at another image (eg: a computer screen) using OpenCV SIFT.

debug view


pip install screenpoint


import screenpoint
import cv2

# Load input images.
screen = cv2.imread('screen.png', 0)
view = cv2.imread('view.jpg', 0)

# Project view centroid to screen space.
# x and y are the coordinate of the `view` centroid in `screen` space.
x, y = screenpoint.project(view, screen)

See for more information.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

screenpoint-0.1.2.tar.gz (2.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page