当前位置:网站首页>Halcon wood texture recognition
Halcon wood texture recognition
2022-07-05 08:40:00 【Aii parson】
* Image Acquisition 01: Code generated by Image Acquisition 01
list_files ('E:/03 CV( ancient )/Halcon/ Code / Wood texture recognition ', ['files','follow_links'], ImageFiles)
tuple_regexp_select (ImageFiles, ['\\.(tif|tiff|gif|bmp|jpg|jpeg|jp2|png|pcx|pgm|ppm|pbm|xwd|ima|hobj)$','ignore_case'], ImageFiles)
for Index := 0 to |ImageFiles| - 1 by 1
read_image (Image, ImageFiles[Index])
dev_clear_window ()
get_image_size (Image, Width, Height)
dev_open_window (0, 0, Width/5, Height/5, 'black', WindowHandle)
dev_display (Image)
rgb1_to_gray (Image, GrayImage)
threshold (GrayImage, Regions, 44, 255)
connection (Regions, ConnectedRegions)
select_shape (ConnectedRegions, SelectedRegions, 'area', 'and', 40825.7, 500000)
Classes:=['apple','beech','cherry','maple','oak']
cooc_feature_image (SelectedRegions, GrayImage, 6, 0, Energy, Correlation, Homogeneity, Contrast)# Calculate the co-occurrence matrix and derive its gray value characteristics
sobel_amp (GrayImage, EdgeAmplitude, 'sum_abs', 3)# Use Sobel Operator detection edge ( Range ) features
gray_histo_abs (SelectedRegions, EdgeAmplitude, 8, AbsoluteHisto)# Calculate the distribution of gray values .Quantization=6 Represents the quantization of the input gray value .
endfor
边栏推荐
- Run菜单解析
- Classification of plastic surgery: short in long long long
- 2022.7.4-----leetcode.1200
- 暑假第一周
- 猜谜语啦(2)
- Xrosstools tool installation for X-Series
- [牛客网刷题 Day4] JZ55 二叉树的深度
- Guess riddles (2)
- Yolov4 target detection backbone
- Bluebridge cup internet of things basic graphic tutorial - GPIO input key control LD5 on and off
猜你喜欢
Business modeling of software model | vision
每日一题——替换空格
Typical low code apaas manufacturer cases
Business modeling of software model | overview
Guess riddles (142)
Guess riddles (7)
Illustration of eight classic pointer written test questions
How to write cover letter?
Various types of questions judged by prime numbers within 100 (C language)
实例002:“个税计算” 企业发放的奖金根据利润提成。利润(I)低于或等于10万元时,奖金可提10%;利润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可提成7.
随机推荐
Guess riddles (4)
Some pitfalls of win10 network sharing
[three tier architecture]
STM32 single chip microcomputer - external interrupt
Guess riddles (9)
Cmder of win artifact
实例004:这天第几天 输入某年某月某日,判断这一天是这一年的第几天?
Illustration of eight classic pointer written test questions
C语言标准函数scanf不安全的原因
Yolov4 target detection backbone
实例001:数字组合 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?
Arduino burning program and Arduino burning bootloader
Cinq détails de conception du régulateur de tension linéaire
Old Wang's esp8266 and old Wu's ws2818 light strip
Five design details of linear regulator
Digital analog 1: linear programming
猜谜语啦(4)
Explore the authentication mechanism of StarUML
How can fresh students write resumes to attract HR and interviewers
[daily training -- Tencent selected 50] 557 Reverse word III in string