Method and device for testing resolving power of camera

文档序号:1651428 发布日期:2019-12-24 浏览:17次 中文

阅读说明:本技术 一种相机的解析力测试方法和装置 (Method and device for testing resolving power of camera ) 是由 王永清 张联昌 廖昀 于 2019-08-27 设计创作,主要内容包括:本发明一实施例提供一种相机的解析力测试方法,包括:将相机对ISO12233测试卡拍摄得到的铺满屏幕的图像划分左上、左下、右上、右下和中间5个区域;其中,所述图像包括位于中间区域的楔形线和分别位于所述左上、左下、右上、右下区域的十字楔形线,所述左上、左下、右上和右下4个区域的十字楔形线的图案一致;分别对所述中间区域的楔形线和任一个所述十字楔形线进行定位,获取对应的线束区域;所述线束区域中获取线束的总长度和实际线束长度;根据实际线束长度和线束的总长度之比,计算得到解析力。本发明实施例能够实现各区的楔形线的自动定位、楔形线线束的读取,从而实现相机的解析力测试的自动化。(An embodiment of the present invention provides a method for testing an analytic force of a camera, including: dividing an image of a full screen, which is obtained by shooting an ISO12233 test card by a camera, into 5 areas, namely, the upper left area, the lower left area, the upper right area, the lower right area and the middle area; the image comprises a wedge line positioned in a middle area and cross wedge lines respectively positioned in an upper left area, a lower left area, an upper right area and a lower right area, and the patterns of the cross wedge lines of the upper left area, the lower left area, the upper right area and the lower right area are consistent; respectively positioning the wedge-shaped lines in the middle area and any one of the cross wedge-shaped lines to obtain corresponding wire harness areas; acquiring the total length of a wire harness and the actual length of the wire harness in the wire harness area; and calculating to obtain the analytic force according to the ratio of the actual length of the wire harness to the total length of the wire harness. The embodiment of the invention can realize the automatic positioning of the wedge wires in each area and the reading of the wedge wire harnesses, thereby realizing the automation of the analysis force test of the camera.)

1. A method for testing the resolving power of a camera is characterized by comprising the following steps:

dividing an image of a full screen, which is obtained by shooting an ISO12233 test card by a camera, into 5 areas, namely, the upper left area, the lower left area, the upper right area, the lower right area and the middle area; the image comprises a wedge line positioned in a middle area and cross wedge lines respectively positioned in an upper left area, a lower left area, an upper right area and a lower right area, and the patterns of the cross wedge lines of the upper left area, the lower left area, the upper right area and the lower right area are consistent;

respectively positioning the wedge-shaped lines in the middle area and any one of the cross wedge-shaped lines to obtain corresponding wire harness areas;

acquiring the total length of the wire harness and the actual wire harness length from the wire harness area;

and calculating to obtain the analytic force according to the ratio of the actual length of the wire harness to the total length of the wire harness.

2. The method for testing resolving power of a camera according to claim 1, wherein the positioning the wedge line in the middle area to obtain the wire harness area specifically comprises:

automatically intercepting a region which is 4 times larger than the middle square in the middle region as an ROI region for rectangular identification;

converting the ROI area into a gray map;

binarizing the gray level image according to a plurality of 5 steps within a set threshold value range, and performing primary expansion after binarizing according to different threshold values each time so as to completely fill the interior of the ROI;

corroding the ROI after the last expansion so as to disconnect the ROI from the wedge lines on the left side and the right side;

extracting the outline of the corroded ROI area, and performing quadrilateral approximation on the outline to obtain a first target rectangle;

and positioning the ROI (region of interest) containing the wedge lines of the middle region according to the relative position relation between the middle wedge lines and the first target rectangle to obtain a wire harness region.

3. The method for testing resolving power of a camera according to claim 1, wherein the positioning any one cross wedge to obtain the beam area specifically includes:

automatically intercepting a region with an area larger than that of the cross wedge line at the position of the cross wedge line;

binarizing the intercepted region by adopting a self-adaptive threshold value;

corroding the intercepted area after binaryzation to corrode the wire harness of the cross wedge wire;

carrying out contour screening on the corroded area by using morphological characteristics to obtain a central square of the middle area of the cross wedge line;

and cutting out a wire harness area which does not contain the central square.

4. The method for testing resolving power of a camera according to any one of claims 1 to 3, wherein the step of obtaining the total length of the wire harness and the actual length of the wire harness from the wire harness region comprises:

binarizing the wire harness area by adopting a self-adaptive threshold value;

expanding the binarized wire harness area to obtain the complete wire harness length;

carrying out contour screening by using morphological characteristics, and making a minimum external rectangle on the screened contour to obtain the total length of the wire harness;

carrying out binarization on the wiring harness area by adopting an Otsu method, and removing the wiring harness area capable of distinguishing textures by adopting corrosion parameters;

and making the corroded image into a minimum circumscribed rectangle to obtain the actual harness length of the harness.

5. An analytical force testing device for a camera, comprising:

the dividing unit is used for dividing an image of a full screen, which is obtained by shooting an ISO12233 test card by a camera, into 5 areas, namely an upper left area, a lower left area, an upper right area, a lower right area and a middle area; the image comprises a wedge line positioned in a middle area and cross wedge lines respectively positioned in an upper left area, a lower left area, an upper right area and a lower right area, and the patterns of the cross wedge lines of the upper left area, the lower left area, the upper right area and the lower right area are consistent;

the positioning unit is used for respectively positioning the wedge-shaped line in the middle area and any one of the cross wedge-shaped lines to obtain a corresponding wire harness area;

an acquisition unit that acquires a total length of a wire harness and an actual wire harness length from the wire harness region;

and the calculating unit is used for calculating and obtaining the resolving power according to the ratio of the actual wire harness length to the total wire harness length.

6. The device for testing resolving power of a camera according to claim 5, wherein the positioning of the wedge wire in the middle area to obtain the wire harness area specifically comprises:

automatically intercepting a region which is 4 times larger than the middle square in the middle region as an ROI region for rectangular identification;

converting the ROI area into a gray map;

binarizing the gray level image according to a plurality of 5 steps within a set threshold value range, and performing primary expansion after binarizing according to different threshold values each time so as to completely fill the interior of the ROI;

corroding the ROI after the last expansion so as to disconnect the ROI from the wedge lines on the left side and the right side;

extracting the outline of the corroded ROI area, and performing quadrilateral approximation on the outline to obtain a first target rectangle;

and positioning the ROI (region of interest) containing the wedge lines of the middle region according to the relative position relation between the middle wedge lines and the first target rectangle to obtain a wire harness region.

7. The device for testing resolving power of a camera according to claim 5, wherein the positioning any one of the cross wedge lines to obtain the beam area specifically comprises:

automatically intercepting a region with an area larger than that of the cross wedge line at the position of the cross wedge line;

binarizing the intercepted region by adopting a self-adaptive threshold value;

corroding the intercepted area after binaryzation to corrode the wire harness of the cross wedge wire;

carrying out contour screening on the corroded area by using morphological characteristics to obtain a central square of the middle area of the cross wedge line;

and cutting out a wire harness area which does not contain the central square.

8. The device for testing resolving power of a camera according to any one of claims 5 to 7, wherein the obtaining of the total length of the wire harness and the actual wire harness length from the wire harness region comprises:

binarizing the wire harness area by adopting a self-adaptive threshold value;

expanding the binarized wire harness area to obtain the complete wire harness length;

carrying out contour screening by using morphological characteristics, and making a minimum external rectangle on the screened contour to obtain the total length of the wire harness;

carrying out binarization on the wiring harness area by adopting an Otsu method, and removing the wiring harness area capable of distinguishing textures by adopting corrosion parameters;

and making the corroded image into a minimum circumscribed rectangle to obtain the actual harness length of the harness.

Technical Field

The invention relates to the field of camera performance testing, in particular to a method and a device for testing resolving power of a camera.

Background

The sharpness of the camera, also known as resolution or resolution, is an important parameter that characterizes the quality of the camera.

TVline is one of the most intuitive test modes as one of the test modes of analytic force, and ISO12233 is taken as the standard of analysis

The ISO12233 test card is widely applied to the analysis force test of the camera, and the test method comprises the following steps: the camera shoots the card, the position of the camera is adjusted to enable the whole image to be fully laid on the screen, and then the reading of the wedge-shaped line on the test card is manually read, so that the larger the value of the position of the wire harness which can be resolved is, the higher the resolving power of the camera is. However, this method using manual testing is inefficient and cannot be automated.

Disclosure of Invention

In order to solve the technical problems, the invention provides a method and a device for testing the resolving power of a camera, so as to realize automatic positioning of a wedge wire and reading of a wedge wire harness of each area of an ISO12233 test card, thereby realizing automation of the resolving power test of the camera.

An embodiment of the present invention provides a method for testing an analytic force of a camera, including: dividing an image of a full screen, which is obtained by shooting an ISO12233 test card by a camera, into 5 areas, namely, the upper left area, the lower left area, the upper right area, the lower right area and the middle area; the image comprises a wedge line positioned in a middle area and cross wedge lines respectively positioned in an upper left area, a lower left area, an upper right area and a lower right area, and the patterns of the cross wedge lines of the upper left area, the lower left area, the upper right area and the lower right area are consistent;

respectively positioning the wedge-shaped lines in the middle area and any one of the cross wedge-shaped lines to obtain corresponding wire harness areas;

acquiring the total length of the wire harness and the actual wire harness length from the wire harness area;

and calculating to obtain the analytic force according to the ratio of the actual length of the wire harness to the total length of the wire harness.

Further, the positioning the wedge wire in the middle area to obtain the wire harness area specifically includes:

automatically intercepting a region which is 4 times larger than the middle square in the middle region as an ROI region for rectangular identification;

converting the ROI area into a gray map;

binarizing the gray level image according to a plurality of 5 steps within a set threshold value range, and performing primary expansion after binarizing according to different threshold values each time so as to completely fill the interior of the ROI;

corroding the ROI after the last expansion so as to disconnect the ROI from the wedge lines on the left side and the right side;

extracting the outline of the corroded ROI area, and performing quadrilateral approximation on the outline to obtain a first target rectangle;

and positioning the ROI (region of interest) containing the wedge lines of the middle region according to the relative position relation between the middle wedge lines and the first target rectangle to obtain a wire harness region.

Further, the positioning any one cross wedge to obtain the wire harness area specifically includes:

automatically intercepting a region with an area larger than that of the cross wedge line at the position of the cross wedge line;

binarizing the intercepted region by adopting a self-adaptive threshold value;

corroding the intercepted area after binaryzation to corrode the wire harness of the cross wedge wire;

carrying out contour screening on the corroded area by using morphological characteristics to obtain a central square of the middle area of the cross wedge line;

and cutting out a wire harness area which does not contain the central square.

Further, the acquiring the total length of the wire harness and the actual length of the wire harness from the wire harness region specifically includes:

binarizing the wire harness area by adopting a self-adaptive threshold value;

expanding the binarized wire harness area to obtain the complete wire harness length;

carrying out contour screening by using morphological characteristics, and making a minimum external rectangle on the screened contour to obtain the total length of the wire harness;

carrying out binarization on the wiring harness area by adopting an Otsu method, and removing the wiring harness area capable of distinguishing textures by adopting corrosion parameters;

and making the corroded image into a minimum circumscribed rectangle to obtain the actual harness length of the harness.

Another embodiment of the present invention further provides an analytic force testing apparatus for a camera, including:

the dividing unit is used for dividing an image of a full screen, which is obtained by shooting an ISO12233 test card by a camera, into 5 areas, namely an upper left area, a lower left area, an upper right area, a lower right area and a middle area; the image comprises a wedge line positioned in a middle area and cross wedge lines respectively positioned in an upper left area, a lower left area, an upper right area and a lower right area, and the patterns of the cross wedge lines of the upper left area, the lower left area, the upper right area and the lower right area are consistent;

the positioning unit is used for respectively positioning the wedge-shaped line in the middle area and any one of the cross wedge-shaped lines to obtain a corresponding wire harness area;

an acquisition unit that acquires a total length of a wire harness and an actual wire harness length from the wire harness region;

and the calculating unit is used for calculating and obtaining the resolving power according to the ratio of the actual wire harness length to the total wire harness length.

Further, the positioning of the wedge wire in the middle area to obtain the wire harness area specifically includes:

automatically intercepting a region which is 4 times larger than the middle square in the middle region as an ROI region for rectangular identification;

converting the ROI area into a gray map;

binarizing the gray level image according to a plurality of 5 steps within a set threshold value range, and performing primary expansion after binarizing according to different threshold values each time so as to completely fill the interior of the ROI;

corroding the ROI after the last expansion so as to disconnect the ROI from the wedge lines on the left side and the right side;

extracting the outline of the corroded ROI area, and performing quadrilateral approximation on the outline to obtain a first target rectangle;

and positioning the ROI (region of interest) containing the wedge lines of the middle region according to the relative position relation between the middle wedge lines and the first target rectangle to obtain a wire harness region.

Further, the positioning any one cross wedge to obtain the wire harness area specifically includes:

automatically intercepting a region with an area larger than that of the cross wedge line at the position of the cross wedge line;

binarizing the intercepted region by adopting a self-adaptive threshold value;

corroding the intercepted area after binaryzation to corrode the wire harness of the cross wedge wire;

carrying out contour screening on the corroded area by using morphological characteristics to obtain a central square of the middle area of the cross wedge line;

and cutting out a wire harness area which does not contain the central square.

Further, the acquiring the total length of the wire harness and the actual length of the wire harness from the wire harness region specifically includes:

binarizing the wire harness area by adopting a self-adaptive threshold value;

expanding the binarized wire harness area to obtain the complete wire harness length;

carrying out contour screening by using morphological characteristics, and making a minimum external rectangle on the screened contour to obtain the total length of the wire harness;

carrying out binarization on the wiring harness area by adopting an Otsu method, and removing the wiring harness area capable of distinguishing textures by adopting corrosion parameters;

and making the corroded image into a minimum circumscribed rectangle to obtain the actual harness length of the harness.

Compared with the prior art, the method and the device have the advantages that the wedge wires in the areas can be automatically positioned in the ISO12233 card without any feature marks, so that the actual length of the wire harness and the total length of the wire harness can be obtained from the wire harness area, the resolving power of the camera can be obtained, and the automation of the resolving power test of the camera is realized. The function with automatic positioning and intelligent wire harness analysis functions is convenient to use in the automatic test of the camera, and large redundancy is reserved, so that the precision requirement on automatic equipment is reduced, the stability of the test process and the validity of the result are ensured

Drawings

FIG. 1 is an image of an ISO12233 test card.

Fig. 2 is a flowchart of a method for testing resolving power of a camera according to an embodiment of the present invention;

fig. 3 is a structural diagram of an analysis force testing apparatus for a camera according to another embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It should be understood that the step numbers used herein are for convenience of description only and are not intended as limitations on the order in which the steps are performed.

It is to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

The terms "comprises" and "comprising" indicate the presence of the described features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.

The term "and/or" refers to and includes any and all possible combinations of one or more of the associated listed items.

Referring to fig. 1-2, an embodiment of the invention provides a method for testing an analysis force of a camera, including:

s1, dividing an image of a full screen shot by an ISO12233 test card into 5 areas in the left upper area, the left lower area, the right upper area, the right lower area and the middle area by a camera; the image comprises a wedge line positioned in the middle area and cross wedge lines respectively positioned in the upper left area, the lower left area, the upper right area and the lower right area, and the patterns of the cross wedge lines of the upper left area, the lower left area, the upper right area and the lower right area are consistent.

Wherein, the upper left area is the 1 st area, the lower left area is the 2 nd area, the middle area is the 3 rd area, the lower right area is the 4 th area, and the upper right area is the 5 th area.

And S2, positioning the wedge lines in the middle area and any one of the cross wedge lines respectively to obtain corresponding wire harness areas.

In one embodiment, when the wedge wires in the middle area are positioned to obtain the wire harness area, specifically, the method includes:

automatically intercepting a region which is 4 times larger than the middle square in the middle region as an ROI region for rectangular identification;

converting the ROI area into a gray map;

binarizing the gray level image according to a plurality of 5 steps within a set threshold value range, and performing primary expansion after binarizing according to different threshold values each time so as to completely fill the interior of the ROI;

corroding the ROI after the last expansion so as to disconnect the ROI from the wedge lines on the left side and the right side;

extracting the outline of the corroded ROI area, and performing quadrilateral approximation on the outline to obtain a first target rectangle;

and positioning the ROI (region of interest) containing the wedge lines of the middle region according to the relative position relation between the middle wedge lines and the first target rectangle to obtain a wire harness region.

Through the steps, the wedge line of the middle area is positioned

In the present embodiment, it should be understood that, since the test ISO12233 needs to ensure that the test card needs to be read in a full screen, after the picture taken by the camera is obtained according to the rule, an ROI area four times larger than the middle square is extracted in the middle area of the picture for rectangle recognition. And (3) positioning the middle rectangular ROI, converting the rectangular ROI into a gray map, binarizing according to 5 steps within a set threshold value range, performing expansion once after binarizing according to different threshold values every time, completely filling the inside of the rectangle, and performing corrosion once again to disconnect the rectangle and the wedge lines on the left side and the right side. And (4) taking the outline of the rectangle connected with the wedge line, and performing quadrilateral approximation, wherein if the included angle of four sides of the quadrilateral is close to 90 degrees, the rectangle is the rectangle to be positioned. And then, according to the relative position relation between the middle wedge line and the rectangle, the ROI actually containing the wedge line of the middle area can be successfully positioned, so that a wiring harness area is obtained, and the middle wedge line of the middle area is also positioned.

In one preferred embodiment, when any one of the cross wedge wires is positioned to obtain the wire harness area, specifically, the method includes:

automatically intercepting a region with an area larger than that of the cross wedge line at the position of the cross wedge line;

binarizing the intercepted region by adopting a self-adaptive threshold value;

corroding the intercepted area after binaryzation to corrode the wire harness of the cross wedge wire;

carrying out contour screening on the corroded area by using morphological characteristics to obtain a central square of the middle area of the cross wedge line;

and cutting out a wire harness area which does not contain the central square.

In this embodiment, it should be understood that, in the case of a full screen test card, the positions of the wedges on the left and right sides on the picture taken by the camera are relatively fixed, an approximate position slightly larger than the cross wedge is cut, and then the cut area is subjected to fine analysis. The region is first binarized using an adaptive threshold, and the beam of the cruciform wedge is eroded away using an appropriate erosion radius. And (4) performing contour screening on the corroded binary image by using morphological characteristics to obtain a central square of the middle area of the cross wedge line. By the center position, the area of the wire harness which does not contain the center square can be finely cut.

And S3, acquiring the total length of the wire harness and the actual wire harness length from the wire harness area.

Specifically, the method comprises the following steps:

binarizing the wire harness area by adopting a self-adaptive threshold value;

expanding the binarized wire harness area to obtain the complete wire harness length;

carrying out contour screening by using morphological characteristics, and making a minimum external rectangle on the screened contour to obtain the total length of the wire harness;

carrying out binarization on the wiring harness area by adopting an Otsu method, and removing the wiring harness area capable of distinguishing textures by adopting corrosion parameters;

and making the corroded image into a minimum circumscribed rectangle to obtain the actual harness length of the harness.

In this embodiment, it should be understood that the full beam length can be obtained by using the adaptive binarized beam region image and then performing a suitable dilation. And (4) screening the contour by using the morphological characteristic contour, and making the screened contour into a minimum circumscribed rectangle, thereby obtaining the total length of the wiring harness. And (3) carrying out binarization on the image of the wire harness area by Otsu method once, removing the wire harness area capable of distinguishing textures by using a proper corrosion parameter, and carrying out minimum circumscribed rectangle on the rest part, thereby obtaining the actual wire harness length of the wire harness.

And S4, calculating to obtain the analytic force according to the ratio of the actual length of the wire harness to the total length of the wire harness.

According to the embodiment of the invention, in complicated features, the target can be slowly approached from coarse to fine step by step, so that the wedge wires in each area can be automatically positioned in an ISO12233 card without any feature marks, the actual length of the wire harness and the total length of the wire harness can be obtained from the wire harness area, the resolving power of a camera can be further obtained, and the automation of the resolving power test of the camera is realized. The function with automatic positioning and intelligent wire harness analysis is convenient to use in the automatic test of the camera, and large redundancy is reserved, so that the precision requirement on automatic equipment is reduced, and the stability of the test process and the validity of the result are ensured.

Referring to fig. 1 and 3, an embodiment of the invention further provides a device for testing resolving power of a camera, including: the device comprises a dividing unit 1, a display unit and a control unit, wherein the dividing unit 1 is used for dividing an image of a full screen, which is obtained by shooting an ISO12233 test card by a camera, into an upper left area, a lower left area, an upper right area, a lower right area and a middle 5 areas; the image comprises a wedge line positioned in the middle area and cross wedge lines respectively positioned in the upper left area, the lower left area, the upper right area and the lower right area, and the patterns of the cross wedge lines of the upper left area, the lower left area, the upper right area and the lower right area are consistent.

And the positioning unit 2 is used for respectively positioning the wedge-shaped line in the middle area and any one of the cross wedge-shaped lines to obtain a corresponding wire harness area.

In one embodiment, when the wedge wires in the middle area are positioned to obtain the wire harness area, specifically, the method includes:

automatically intercepting a region which is 4 times larger than the middle square in the middle region as an ROI region for rectangular identification;

converting the ROI area into a gray map;

binarizing the gray level image according to a plurality of 5 steps within a set threshold value range, and performing primary expansion after binarizing according to different threshold values each time so as to completely fill the interior of the ROI;

corroding the ROI after the last expansion so as to disconnect the ROI from the wedge lines on the left side and the right side;

extracting the outline of the corroded ROI area, and performing quadrilateral approximation on the outline to obtain a first target rectangle;

and positioning the ROI (region of interest) containing the wedge lines of the middle region according to the relative position relation between the middle wedge lines and the first target rectangle to obtain a wire harness region.

Through the steps, the wedge line of the middle area is positioned

In the present embodiment, it should be understood that, since the test ISO12233 needs to ensure that the test card needs to be read in a full screen, after the picture taken by the camera is obtained according to the rule, an ROI area four times larger than the middle square is extracted in the middle area of the picture for rectangle recognition. And (3) positioning the middle rectangular ROI, converting the rectangular ROI into a gray map, binarizing according to 5 steps within a set threshold value range, performing expansion once after binarizing according to different threshold values every time, completely filling the inside of the rectangle, and performing corrosion once again to disconnect the rectangle and the wedge lines on the left side and the right side. And (4) taking the outline of the rectangle connected with the wedge line, and performing quadrilateral approximation, wherein if the included angle of four sides of the quadrilateral is close to 90 degrees, the rectangle is the rectangle to be positioned. And then, according to the relative position relation between the middle wedge line and the rectangle, the ROI actually containing the wedge line of the middle area can be successfully positioned, so that a wiring harness area is obtained, and the middle wedge line of the middle area is also positioned.

In one preferred embodiment, when any one of the cross wedge wires is positioned to obtain the wire harness area, specifically, the method includes:

automatically intercepting a region with an area larger than that of the cross wedge line at the position of the cross wedge line;

binarizing the intercepted region by adopting a self-adaptive threshold value;

corroding the intercepted area after binaryzation to corrode the wire harness of the cross wedge wire;

carrying out contour screening on the corroded area by using morphological characteristics to obtain a central square of the middle area of the cross wedge line;

and cutting out a wire harness area which does not contain the central square.

In this embodiment, it should be understood that, in the case of a full screen test card, the positions of the wedges on the left and right sides on the picture taken by the camera are relatively fixed, an approximate position slightly larger than the cross wedge is cut, and then the cut area is subjected to fine analysis. The region is first binarized using an adaptive threshold, and the beam of the cruciform wedge is eroded away using an appropriate erosion radius. And (4) performing contour screening on the corroded binary image by using morphological characteristics to obtain a central square of the middle area of the cross wedge line. By the center position, the area of the wire harness which does not contain the center square can be finely cut.

An acquiring unit 3 for acquiring a total length of the wire harness and an actual wire harness length from the wire harness region.

Specifically, the method comprises the following steps:

binarizing the wire harness area by adopting a self-adaptive threshold value;

expanding the binarized wire harness area to obtain the complete wire harness length;

carrying out contour screening by using morphological characteristics, and making a minimum external rectangle on the screened contour to obtain the total length of the wire harness;

carrying out binarization on the wiring harness area by adopting an Otsu method, and removing the wiring harness area capable of distinguishing textures by adopting corrosion parameters;

and making the corroded image into a minimum circumscribed rectangle to obtain the actual harness length of the harness.

In this embodiment, it should be understood that the full beam length can be obtained by using the adaptive binarized beam region image and then performing a suitable dilation. And screening the profile by using the morphological characteristic profile, and making the screened profile into a minimum circumscribed rectangle so as to obtain the total length of the wire harness. And (3) carrying out binarization on the image of the wire harness area by Otsu method once, removing the wire harness area capable of distinguishing textures by using a proper corrosion parameter, and carrying out minimum external rectangle on the rest part, thereby obtaining the actual wire harness length of the wire harness.

And the calculating unit 4 is used for calculating and obtaining the resolving power according to the ratio of the actual length of the wire harness to the total length of the wire harness.

According to the embodiment of the invention, in complicated features, the target can be slowly approached from coarse to fine step by step, so that the automatic positioning of the wedge wires in each area can be realized in an ISO12233 card without any feature mark, the actual length of the wire harness and the total length of the wire harness can be obtained from the wire harness area, the resolving power of a camera can be further obtained, and the automation of the resolving power test of the camera is realized. The function with automatic positioning and intelligent wire harness analysis is convenient to use in the automatic test of the camera, and large redundancy is reserved, so that the precision requirement on automatic equipment is reduced, and the stability of the test process and the validity of the result are ensured.

While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:帧分辨率自适应的视频空时域复杂度评价方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!