当前位置:网站首页>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
边栏推荐
猜你喜欢
[three tier architecture]
实例002:“个税计算” 企业发放的奖金根据利润提成。利润(I)低于或等于10万元时,奖金可提10%;利润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可提成7.
实例009:暂停一秒输出
Bluebridge cup internet of things competition basic graphic tutorial - clock selection
Guess riddles (2)
Daily question - input a date and output the day of the year
猜谜语啦(10)
Guess riddles (11)
Typical low code apaas manufacturer cases
猜谜语啦(11)
随机推荐
Lori remote control commissioning record
319. Bulb switch
每日一题——替换空格
Example 009: pause output for one second
2020-05-21
Some pitfalls of win10 network sharing
[牛客网刷题 Day4] JZ35 复杂链表的复制
Xrosstools tool installation for X-Series
Arduino operation stm32
Array integration initialization (C language)
Example 004: for the day of the day, enter a day of a month of a year to judge the day of the year?
猜谜语啦(2)
The first week of summer vacation
696. 计数二进制子串
319. 灯泡开关
Guess riddles (11)
Meizu Bluetooth remote control temperature and humidity access homeassistant
MATLAB小技巧(28)模糊综合评价
Shift operation of complement
99 multiplication table (C language)