当前位置:网站首页>Image feature Harris corner detection
Image feature Harris corner detection
2022-07-24 07:47:00 【lllliliha】
( Generally speaking, corner points are along x Direction 、 Along the y The change of direction is obvious ; The boundary changes only in one direction )

The basic principle
( Equivalent to the change of gray value )


Based on Taylor expansion , To image I(x,y) In translation (xi,yi) Then we make the first order approximation :




opencv- Corner detection effect
cv2.cornerHarris(img,blockSize,ksize,k)
1、 img: The data type is float32 The input image of
2、blockSize: The size of the specified area in corner detection
3、ksize:sobel Window size used in derivation ( commonly ksize=3)
4、k: retrieval argument 【0.04,0.06】
Code :
import cv2 import numpy as np img=cv2.imread('E:/opencv/chessboard.jpg') print('img.shape:',img.shape) gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) #gray=np.float32(gray) dst=cv2.cornerHarris(gray,2,3,0.04) # Self similarity print('dst.shape:',dst.shape) img[dst>0.01*dst.max()]=[0,0,255] # As long as the position of a corner is greater than the maximum value of self similarity 1%, be true, Mark it in red cv2.imshow('dst',img) cv2.waitKey(0) cv2.destoryAllWindows()
边栏推荐
- 2021-06-03pip error valueerror: unable to find resource t64.exe in package pip_ vendor.distlib
- The difference between get and post
- 游戏三子棋
- JS_ Realize the separation of multiple lines of text into an array according to the newline
- C language advanced part II Pointer
- Selenium basic knowledge multi window processing
- MySQL --- 子查询 - 标量子查询
- Requests crawler implements a simple web page collector
- C language advanced part VII. Program compilation and preprocessing
- Arduino 超级省电之休眠模式用1节18650电池工作17年
猜你喜欢

Oauth2==sso three protocols. Oauth2 four modes

Sense dimension design responsive layout

Amber tutorial A17 learning - concept

Movie recommendation system

Appium doctor command error pit - resolved

MySQL 啥时候用表锁,啥时候用行锁?

Debug No1 summarizes common solutions to bugs

MS SQL Server 2019 学习

Jackson parsing JSON detailed tutorial

Devops essay
随机推荐
The growth path of software testing
Arduino's super power-saving sleep mode has worked with one 18650 battery for 17 years
Advanced part of C language IV. detailed explanation of user-defined types
Train-clean-100 dataset
Hcip 13th day notes
Debug No1 summarizes common solutions to bugs
Jetson AgX Orin source change
【HiFlow】腾讯云HiFlow场景连接器实现校园信息管理智能化
Function analysis of e-commerce website development and construction
Requests crawler implements a simple web page collector
Kubernetes:(一)基本概念
Using bidirectional linked list to realize stack (c)
Do you know the use of string?
Amber tutorial A17 learning - concept
Basic operation of queue
Advanced part of Nacos
Sword finger offer special assault edition day 8
Selenium basic knowledge automatic login QQ space
Installation and use of Zen path & defect report & defect operation
Super simple countdown code writing