当前位置:网站首页>Opencv image basic operation (III) -- image feature extraction (corner detection)
Opencv image basic operation (III) -- image feature extraction (corner detection)
2022-06-11 09:36:00 【Guoqingru】
openCV Basic operation of image ( 3、 ... and )—— Image feature extraction ( Corner detection harris)

The code is as follows :
import cv2
import numpy as np
img = cv2.imread('test_1.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) # Perform focus detection
print ('dst.shape:',dst.shape)
print ('dst',dst)
img[dst>0.01*dst.max()]=[0,0,255]
cv2.imshow('dst',img)
cv2.imwrite("dst.png",img)
cv2.waitKey(0)
cv2.destroyAllWindows()
边栏推荐
- 机器学习笔记 - 使用TensorFlow的Spatial Transformer网络
- 小型制氧机解决方案PCBA电路板开发
- Runtimeerror: blobreader error:the version of imported blob doesn't match graph_ transformer
- document对象
- Modularnotfounderror: no module named 'find_ version’
- 报错[error] input tesnor exceeds available data range [NeuralNetwork(3)] [error] Input tensor ‘0‘ (0)
- Opencv CEO teaches you to use oak (IV): create complex pipelines
- A summary of the problem type and method for proving the limit of sequence in postgraduate entrance examination
- Concurrent programming
- Version mismatch between installed deeply lib and the required one by the script
猜你喜欢

OpenCV CEO教你用OAK(五):基于OAK-D和DepthAI的反欺骗人脸识别系统

A summary of the problem type and method for proving the limit of sequence in postgraduate entrance examination

PD chip ga670-10 for OTG while charging

Day39 process object and other method mutexes

Console you don't know

Device = depthai Device(““, False) TypeError: _init_(): incompatible constructor arguments.

Openstack explanation (22) -- neutron plug-in configuration

Augmented reality experiment IV of Shandong University

Flask (VIII) - form processing

实现边充边OTG的PD芯片GA670-10
随机推荐
How to deal with these problems in the factory production process?
Type-C Bluetooth speaker single port rechargeable OTG solution
【软件】大企业ERP选型的方法
Design of wrist sphygmomanometer based on sic32f911ret6
When the enterprise makes a decision, which part should lead the ERP project?
Day41 process pool and thread pool
Machine learning notes - spatial transformer network using tensorflow
MSF SMB based information collection
【服装ERP】施行在项目中的重要性
Control statement if switch for while while break continue
Flask (VII) - static file
企业决议时,哪个部分应该主导ERP项目?
Set up redis highly available cluster environment
Day 47 how to query a table
[scheme development] scheme of infrared thermometer
Flask (I) - quick start
ERP体系的这些优势,你知道吗?
Detailed explanation of the difference between construction method and method
Flask (II) - route
The difference and relation between machine learning and statistics