← 开源

Project an image centroid to another image using OpenCV

Python
增长势头
+024 小时新增 Star0.0%
437
Star
50
Fork
1
贡献者
创建于 2020-05-01 · 更新于 2026-11-04 · 今日第 23884 名
主要开发者
README

ScreenPoint

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.

Installation

This library only supports Python 3.6 or Python 3.7. That until SIFT becomes available again in opencv-python-contrib.

pip install screenpoint

Usage

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 example.py for more information.

排名相邻

AI Rank iPhone 版

随时追踪 AI 模型榜单

在 App Store 下载