当前位置:网站首页>halcon图像矫正
halcon图像矫正
2022-07-02 03:08:00 【威威当爸了】
图像矫正
**55表示最大文字的高度
text_line_orientation (RegionTrans, InputImage, 55, rad(-30), rad(30), OrientationAngle)
rotate_image (InputImage, ImageRotate, -OrientationAngle/rad(180)*180, 'constant')xld矫正,发现这个不是很灵.
get_image_size (InputImage, imageWidth, imageHeight)
binary_threshold (InputImage, Region2, 'max_separability', 'dark', UsedThreshold2)
fill_up (Region2, RegionFillUp)
erosion_circle (RegionFillUp, RegionErosion, 3.5)
gen_contour_region_xld (RegionErosion, Contours, 'border')
*将轮廓分割为边
segment_contours_xld (Contours, ContoursSplit, 'lines', 5, 30, 2)
XCoordCorners := []
YCoordCorners := []
*获取边的数量
count_obj (ContoursSplit, Number)
*存储每条边的起点位置
for index:=1 to Number by 1
select_obj(ContoursSplit, ObjectCurrent, index)
*拟合每条边
fit_line_contour_xld (ObjectCurrent, 'tukey', -1, 0, 5, 2, RowBegin, ColBegin, RowEnd, ColEnd, Nr, Nc, Dist)
*存储每条边的顶点x坐标
tuple_concat (XCoordCorners, RowBegin, XCoordCorners)
*存储每条边的顶点y坐标
tuple_concat (YCoordCorners, ColBegin, YCoordCorners)
endfor
* 投影变换给四个特征点与校正后的坐标建立关联
XOff:= 100
YOff:= 100*imageHeight/imageWidth
hom_vector_to_proj_hom_mat2d (XCoordCorners, YCoordCorners, [1,1,1,1], [YOff,YOff,imageHeight-YOff,imageHeight-YOff], [XOff,imageWidth-XOff,imageWidth-XOff,XOff], [1,1,1,1], 'normalized_dlt', HomMat2D)
*投影变换
projective_trans_image (InputImage, OuputImage, HomMat2D, 'bilinear', 'false', 'false')
* 显示校正结果
dev_display (OuputImage)
return ()矫正前的图片:
矫正后的图片

边栏推荐
- A list of job levels and salaries in common Internet companies. Those who have conditions must enter big factories. The salary is really high
- 2022 hoisting machinery command examination paper and summary of hoisting machinery command examination
- SAP ui5 beginner tutorial 19 - SAP ui5 data types and complex data binding
- Mmsegmentation series training and reasoning their own data set (3)
- What are the characteristics of common web proxy IP
- After marriage
- 命名块 verilog
- Remote connection to MySQL under windows and Linux system
- [staff] diacritical mark (ascending sign | descending sign B | double ascending sign x | double descending sign BB)
- Gradle notes
猜你喜欢

2022-2028 global human internal visualization system industry research and trend analysis report

Start a business
![[staff] the direction of the symbol stem and the connecting line (the symbol stem faces | the symbol stem below the third line faces upward | the symbol stem above the third line faces downward | the](/img/fe/d97b25f702bbc05f941d08147259e0.jpg)
[staff] the direction of the symbol stem and the connecting line (the symbol stem faces | the symbol stem below the third line faces upward | the symbol stem above the third line faces downward | the

Analysis of FLV packaging format

Cache processing scheme in high concurrency scenario

MongoDB非关系型数据库

Share the basic knowledge of a common Hongmeng application

結婚後
![[staff] pitch representation (bass clef | C1 36 note pitch representation | C2 48 note pitch representation | C3 60 note pitch representation)](/img/98/956d8abbccceb1aae47e25825bc63d.jpg)
[staff] pitch representation (bass clef | C1 36 note pitch representation | C2 48 note pitch representation | C3 60 note pitch representation)

Golang configure export goprivate to pull private library code
随机推荐
How to develop digital collections? How to develop your own digital collections
Spark Tuning
Mathematical calculation in real mode addressing
结婚后
Share the basic knowledge of a common Hongmeng application
Qualcomm platform wifi-- WPA_ supplicant issue
Possible causes of runtime error
結婚後
JDBC details
Addition without addition, subtraction, multiplication and division (simple difficulty)
Remote connection to MySQL under windows and Linux system
Face++ realizes face detection in the way of flow
【JVM】创建对象的流程详解
Actual battle of financial risk control - under Feature Engineering
[untitled]
Verilog 避免 Latch
GB/T-2423. XX environmental test documents, including the latest documents
V-model of custom component
What are the common proxy servers and what are the differences?
How does proxy IP participate in the direct battle between web crawlers and anti crawlers