{"id":297,"date":"2023-05-06T22:33:47","date_gmt":"2023-05-06T14:33:47","guid":{"rendered":"https:\/\/yhsbj.cn\/?p=297"},"modified":"2023-05-06T22:35:22","modified_gmt":"2023-05-06T14:35:22","slug":"haicon%e7%9f%ab%e6%ad%a3%e5%9b%be%e5%83%8f%e5%8f%98%e5%bd%a2","status":"publish","type":"post","link":"https:\/\/yhsbj.cn\/index.php\/2023\/05\/06\/297\/","title":{"rendered":"Haicon\u77eb\u6b63\u56fe\u50cf\u53d8\u5f62"},"content":{"rendered":"\n<p>\u56fe\u50cf\u77eb\u6b63\u524d\u540e\u5bf9\u6bd4\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/05\/display.jpg\" alt=\"\" class=\"wp-image-298\" width=\"308\" height=\"231\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/05\/display.jpg 640w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/05\/display-300x225.jpg 300w\" sizes=\"(max-width: 308px) 100vw, 308px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/05\/\u5c4f\u5e55\u622a\u56fe-2023-05-06-222827.png\" alt=\"\" class=\"wp-image-302\" width=\"320\" height=\"268\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/05\/\u5c4f\u5e55\u622a\u56fe-2023-05-06-222827.png 957w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/05\/\u5c4f\u5e55\u622a\u56fe-2023-05-06-222827-300x252.png 300w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/05\/\u5c4f\u5e55\u622a\u56fe-2023-05-06-222827-768x646.png 768w\" sizes=\"(max-width: 320px) 100vw, 320px\" \/><\/figure>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">*\u5173\u95ed\u5f53\u524d\u663e\u793a\u7a97\u53e3\uff0c\u6e05\u7a7a\u5c4f\u5e55\ndev_close_window ()\n*\u8bfb\u53d6\u6d4b\u8bd5\u56fe\u50cf\nread_image (Image_display, 'E:\/test_display.jpg')\n*\u5c06\u56fe\u50cf\u8f6c\u5316\u4e3a\u7070\u5ea6\u56fe\u50cf\nrgb1_to_gray (Image_display, GrayImage)\n*\u83b7\u53d6\u56fe\u50cf\u7684\u5c3a\u5bf8\nget_image_size(Image_display,imageWidth, imageHeight)\n*\u65b0\u5efa\u663e\u793a\u7a97\u53e3\uff0c\u9002\u5e94\u56fe\u50cf\u5c3a\u5bf8\ndev_open_window (0, 0, imageWidth, imageHeight, 'black', WindowHandle1)\ndev_display (GrayImage)\n*\u521d\u59cb\u5316\u89d2\u70b9\u5750\u6807\nXCoordCorners := []\nYCoordCorners := []\n*\u9608\u503c\u5904\u7406\uff0c\u63d0\u53d6\u8f83\u6697\u7684\u533a\u57df\nthreshold(GrayImage,DarkRegion,0, 80)\n*\u5206\u79bb\u4e0d\u76f8\u8fde\u7684\u533a\u57df\nconnection (DarkRegion, ConnectedRegions)\n*\u9009\u62e9\u9762\u79ef\u6700\u5927\u7684\u6697\u8272\u533a\u57df\uff0c\u5373\u5c4f\u5e55\u533a\u57df\nselect_shape_std (ConnectedRegions, displayRegion, 'max_area', 70)\n*\u88c1\u526a\u5c4f\u5e55\u533a\u57df\nreduce_domain (GrayImage, displayRegion, displayImage)\n*\u521b\u5efa\u8fb9\u7f18\u8f6e\u5ed3\ngen_contour_region_xld (displayRegion, Contours, 'border')\n*\u5c06\u8f6e\u5ed3\u5206\u5272\u4e3a\u8fb9\nsegment_contours_xld (Contours, ContoursSplit, 'lines', 5, 4, 2)\n*\u83b7\u53d6\u8fb9\u7684\u6570\u91cf\ncount_obj (ContoursSplit, Number)\n*\u5b58\u50a8\u6bcf\u6761\u8fb9\u7684\u8d77\u70b9\u4f4d\u7f6e\nfor index:=1 to Number by 1\n   select_obj(ContoursSplit, ObjectCurrent, index)\n   *\u62df\u5408\u6bcf\u6761\u8fb9\n   fit_line_contour_xld (ObjectCurrent, 'tukey', -1, 0, 5, 2, RowBegin, ColBegin, RowEnd, ColEnd, Nr, Nc, Dist)\n   *\u5b58\u50a8\u6bcf\u6761\u8fb9\u7684\u9876\u70b9x\u5750\u6807\n   tuple_concat (XCoordCorners, RowBegin, XCoordCorners)\n   *\u5b58\u50a8\u6bcf\u6761\u8fb9\u7684\u9876\u70b9y\u5750\u6807\n   tuple_concat (YCoordCorners, ColBegin, YCoordCorners)\nendfor\n\n* \u6295\u5f71\u53d8\u6362\u7ed9\u56db\u4e2a\u7279\u5f81\u70b9\u4e0e\u6821\u6b63\u540e\u7684\u5750\u6807\u5efa\u7acb\u5173\u8054\nXOff:= 100\nYOff:= 100*imageHeight\/imageWidth\nhom_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)\n*\u6295\u5f71\u53d8\u6362\nprojective_trans_image (Image_display, Image_rectified, HomMat2D, 'bilinear', 'false', 'false')\n* \u663e\u793a\u6821\u6b63\u7ed3\u679c\ndev_display (Image_rectified)\n<\/pre>\n\n\n\n<p>\u4e8c\u7ef4\u7801\u77eb\u6b63\u524d\u540e\u5bf9\u6bd4\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/05\/test1111.jpg\" alt=\"\" class=\"wp-image-300\" width=\"225\" height=\"225\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/05\/test1111.jpg 750w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/05\/test1111-300x300.jpg 300w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/05\/test1111-150x150.jpg 150w\" sizes=\"(max-width: 225px) 100vw, 225px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/05\/\u5c4f\u5e55\u622a\u56fe-2023-05-06-221718.png\" alt=\"\" class=\"wp-image-301\" width=\"194\" height=\"212\" srcset=\"https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/05\/\u5c4f\u5e55\u622a\u56fe-2023-05-06-221718.png 640w, https:\/\/yhsbj.cn\/wp-content\/uploads\/2023\/05\/\u5c4f\u5e55\u622a\u56fe-2023-05-06-221718-275x300.png 275w\" sizes=\"(max-width: 194px) 100vw, 194px\" \/><\/figure>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">dev_close_window()\nread_image(Image, 'E:\/test1111.jpg')\nget_image_size(Image, Width, Height)\ndev_open_window(0,0, Width \/ 2, Height \/ 2, 'black', WindowHandle)\nrgb1_to_gray(Image, ImageGray)\ndev_display(ImageGray)\ncreate_data_code_2d_model('QR Code', [], [], DataCodeHandle)\nfind_data_code_2d(ImageGray, SymbolXLDs, DataCodeHandle, [], [], ResultHandles, DecodedDataStrings)\nget_contour_xld(SymbolXLDs, Rows, Cols)\ndev_display(SymbolXLDs)\nRows := remove(Rows, 4)\nCols := remove(Cols, 4)\nXOff:= 100\nYOff:= 100*Height\/Width\nhom_vector_to_proj_hom_mat2d(Rows, Cols, [1, 1, 1, 1], [YOff,YOff,Height-YOff,Height-YOff], [XOff,Width-XOff,Width-XOff,XOff], [1, 1, 1, 1], 'normalized_dlt', HomMat2D)\nprojective_trans_image(ImageGray, Image_rectified, HomMat2D, 'bilinear', 'false', 'true')<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u56fe\u50cf\u77eb\u6b63\u524d\u540e\u5bf9\u6bd4\uff1a \u4e8c\u7ef4\u7801\u77eb\u6b63\u524d\u540e\u5bf9\u6bd4\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[37],"tags":[],"_links":{"self":[{"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/posts\/297"}],"collection":[{"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/comments?post=297"}],"version-history":[{"count":1,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/posts\/297\/revisions"}],"predecessor-version":[{"id":303,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/posts\/297\/revisions\/303"}],"wp:attachment":[{"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/media?parent=297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/categories?post=297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yhsbj.cn\/index.php\/wp-json\/wp\/v2\/tags?post=297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}