当前位置:网站首页>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
边栏推荐
- Hello everyone, welcome to my CSDN blog!
- GEO数据库中搜索数据
- STM32 --- configuration of external interrupt
- Sword finger offer 05 Replace spaces
- How can fresh students write resumes to attract HR and interviewers
- 【日常训练--腾讯精选50】557. 反转字符串中的单词 III
- Classification of plastic surgery: short in long long long
- Digital analog 2: integer programming
- Go dependency injection -- Google open source library wire
- Chapter 18 using work queue manager (1)
猜你喜欢
随机推荐
Pytorch entry record
PIP installation
Infected Tree(树形dp)
Sword finger offer 09 Implementing queues with two stacks
Search data in geo database
Guess riddles (11)
STM32 summary (HAL Library) - DHT11 temperature sensor (intelligent safety assisted driving system)
[daily training] 1200 Minimum absolute difference
STM32 --- NVIC interrupt
696. 计数二进制子串
Stm32--- systick timer
实例007:copy 将一个列表的数据复制到另一个列表中。
2022.7.4-----leetcode. one thousand and two hundred
leetcode - 445. Add two numbers II
Run菜单解析
Bit operation related operations
Explore the authentication mechanism of StarUML
Yolov4 target detection backbone
ABC#237 C
Guess riddles (6)