【Halcon】 Halcon直线检测(LD)
来源:互联网 发布:手机串行端口 编辑:程序博客网 时间:2024/04/29 17:22
dev_update_off () dev_close_window () dev_open_window (0, 0, 800, 600, 'white', WindowHandle) dev_set_draw ('margin') read_image( Image,'fabrik')*ROIdev_display(Image)draw_rectangle1(WindowHandle,row, col, Length1, length2)rectangle1_domain(Image, ImageReduced, row, col, Length1, length2)sobel_dir(ImageReduced,EdgeAmplitude,EdgeDirection,'sum_abs', 3)dev_set_color('red')threshold(EdgeAmplitude, Region, 55,255)reduce_domain(EdgeDirection,Region,EdgeDirectionReduced)hough_lines_dir( EdgeDirectionReduced,HoughImage, Lines, 4, 2, 'mean', 3, 25, 5, 5, 'true', Angle, Dist)gen_region_hline(LinesHNF, Angle,Dist)dev_display(LinesHNF)
* Detect lines in an image with the help of the Hough transform* using the edge direction as additional information and return it both* in HNF and as regions* read_image (Image, 'fabrik')rectangle1_domain (Image, ImageReduced, 170, 280, 310, 360)* Detect edges (amplitude and direction) using the Sobel operatorsobel_dir (ImageReduced, EdgeAmplitude, EdgeDirection, 'sum_abs', 3)dev_set_color ('red')threshold (EdgeAmplitude, Region, 55, 255)* Reduce the direction image to the edge regionreduce_domain (EdgeDirection, Region, EdgeDirectionReduced)* Start the Hough transform using the edge direction informationhough_lines_dir (EdgeDirectionReduced, HoughImage, Lines, 4, 2, 'mean', 3, 25, 5, 5, 'true', Angle, Dist)* Store input lines described in HNFgen_region_hline (LinesHNF, Angle, Dist)dev_display (Image)dev_set_colored (12)* Display the linesdev_set_draw ('margin')dev_display (LinesHNF)* Display the edge pixels that contributed to the corresponding linesdev_set_draw ('fill')dev_display (Lines)
read_image (Image, 'fabrik')rectangle1_domain (Image, ImageReduced, 230, 180, 330, 280)* Detect edges (amplitude) using the Sobel operatorsobel_amp (ImageReduced, EdgeAmplitude, 'thin_sum_abs', 3)dev_set_color ('red')threshold (EdgeAmplitude, Region, 10, 255)hough_lines (Region, 4, 50, 5, 5, Angle, Dist)dev_set_color ('blue')* Store input lines described in HNFgen_region_hline (Regions, Angle, Dist)
dev_update_off () dev_close_window () dev_open_window (0, 0, 600, 400, 'white', WindowHandle) dev_set_draw ('margin')read_image (Image, '01.bmp') dev_display(Image)draw_rectangle1(WindowHandle, Row1, Column1, Row2, Column2)rectangle1_domain (Image, ImageReduced, Row1, Column1, Row2, Column2)reduce_domain(Image,ImageReduced , ImageReduced1)*从Image图像中裁剪一个矩形区域crop_domain(ImageReduced1, ImageROI)write_image (ImageROI, 'bmp', 0, '0')dev_display(ImageROI)smooth_image (ImageROI, ImageSmooth, 'gauss', 0.8)dev_display(ImageSmooth)draw_rectangle1(WindowHandle, Row21, Column21, Row22, Column22)rectangle1_domain (ImageSmooth, ImageRe2, Row21, Column21, Row22, Column22)reduce_domain(ImageSmooth,ImageRe2 , ImageReRe2)*从Image图像中裁剪一个矩形区域*crop_domain(ImageReRe2, ImageROI2)dev_display(ImageReRe2)sobel_dir(ImageReRe2, EdgeAmplitude, EdgeDirection, 'sum_abs', 3)dev_set_color('red') threshold(EdgeAmplitude, Region, 100,255) reduce_domain(EdgeDirection,Region,EdgeDirectionReduced) hough_lines_dir( EdgeDirectionReduced, HoughImage, Lines, 4, 2, 'mean', 3, 25, 5, 5, 'true', Angle, Dist) gen_region_hline(LinesHNF, Angle,Dist) dev_display(LinesHNF)
0 0
- 【Halcon】 Halcon直线检测(LD)
- 【Halcon】霍夫直线检测hough_lines
- Halcon之hough变换检测直线
- HALCON
- halcon : ::
- HALCON
- Halcon清晰度检测实例(转)
- halcon图像边缘提取(边缘检测)
- halcon图像边缘提取(边缘检测)
- halcon 检测圆
- halcon 边沿检测识别
- halcon车道检测实例注释
- halcon学习之产品检测
- 【Halcon】常用Halcon算子(一)
- Halcon学习日志(1)-Halcon简介
- halcon脱机运行(不安装halcon)
- Halcon一维测量--直线测量
- Halcon学习(八)边缘检测(一)
- Arrays.sort()总结
- jQuery深入之源码解析(一)
- python中的@符号的作用
- Mysql insert语句的优化
- C++的强制类型转换
- 【Halcon】 Halcon直线检测(LD)
- Linux服务器搭建之<MySQL>(二)
- <h1>what </h1>
- ios Webview上返回上一个网页
- Mysql group by语句的优化
- Java Double相加出现的怪事
- 架构设计:系统间通信(34)——被神化的ESB(上)
- win7下主副屏切换
- Mysql order by语句的优化