Giter Club home page Giter Club logo

detect_opencv's Introduction

算法流程

(一) 输入处理

resize-->(h/2, w/2)

灰度化

(二) 参考线检测

1.检测台基准线

基于角点检测计算构成

2. 活塞底部缸体座线

由于该参考线与活塞属于同一体且直径相同,基于角点检测计算很难给出合适的阈值,

结合边缘检测线计算。

(三) 流孔检测

1. 提取感兴趣区域ROI

2. 计算ROI区域图像梯度变化值

gradient = gradient_x + gradient_y
gradient_x = img[i+1,j] - img[i,y]
gradient_y = img[i,j+1] - img[i,j]

3. 二值化梯度分布

为了减少干扰影响,将梯度小于等于1的值置零,其余为255

4. 寻找流道孔边界

定义一个3*3大小的核,在上述计算的梯度分布上滑动,过滤掉多余的梯度值,最终找出理想的流道孔边界

5. 寻找包围流道孔的最小外接矩形框

该框即为最终流道孔的定位框

(四) 计算距离

1. 测量台基准线与流道孔的像素距离

2. 活塞表面左右投影线与流道孔的像素距离

detect_opencv's People

Contributors

wangzhongju avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.