Image distortion detection method and system
By outputting test images in the image output device and using the image acquisition device to capture the imaging picture, detecting the width of lines in the image image to judge the image distortion, the problem of depth of field distortion in virtual image and holographic image display technology is solved, and image imaging is realized Effective quality inspection and guarantee.
Patent Information
- Application Number
- CN201711235491.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2017-11-30
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2037-11-30
AI Technical Summary
In virtual image display technology and holographic image display technology, images are prone to depth of field distortion, especially in applications with high requirements for imaging quality, such as vehicle-mounted head-up displays, the depth of field distortion of images may bring safety risks and require the output image to be Depending on the depth of field distortion.
By controlling the image output device to output the test image, and using the image acquisition device to capture the test image, the image forming picture is obtained. Based on the width of the lines in the image image, determine whether the image distortion meets the requirements. The method includes placing the reference object at the imaging position of the image output device and adjusting the focal length of the image acquisition device to obtain the clearest imaging picture.
By detecting the width of the lines in the imaged picture, the depth of field distortion of the image can be effectively judged, ensuring that the imaging quality of the image output device meets safety and quality requirements.
Smart Images

Figure CN109859155B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of display system testing, and in particular to an image distortion detection method and system. Background Art
[0002] With the advancement of science and technology, the application of display technology is becoming more and more extensive. For example, virtual image display technology and holographic image display technology are gradually applied to people's daily lives. In this type of display technology, the image is not formed on the display screen, which is prone to depth distortion. In some scenarios, the requirements for imaging quality are high, such as the head-up display (HUD) in the car that involves the personal safety of the driver. The depth distortion of the image may bring danger. Therefore, it is necessary to detect the depth distortion of the output image. Summary of the invention
[0003] The embodiment of the present invention provides an image distortion detection method and system, which can be used to detect the depth of field distortion of an image output by an image output device. The technical solution is as follows:
[0004] On the one hand, an embodiment of the present invention provides an image distortion detection method, comprising: controlling an image output device to output a test image, wherein the test image is an image output by the image output device after a test pattern is input; photographing the test image using an image acquisition device to obtain an imaging picture, wherein the imaging picture is a picture photographed when the image acquisition device is focused on an imaging position of the image output device, and the image acquisition device is arranged at a set observation point of the image output device; and determining whether the image distortion meets the requirements based on the width of the lines in the imaging picture.
[0005] Optionally, the test pattern is an equidistant grid pattern.
[0006] In one implementation of the embodiments of the present invention, the use of an image acquisition device to shoot the test image to obtain an imaging picture includes: placing a reference object at an imaging position of an image output device, the distance between the imaging position and the set observation point being equal to a set imaging distance; focusing the image acquisition device on the reference object, shooting the test image, and obtaining the imaging picture.
[0007] In another implementation of the embodiment of the present invention, the test image is photographed by an image acquisition device to obtain an imaging picture, including: adjusting the focal length of the image acquisition device at set intervals, and photographing the test image once after each adjustment to obtain multiple image pictures; and selecting the clearest image picture from the multiple image pictures as the imaging picture.
[0008] Furthermore, the selecting the clearest image picture from the multiple image pictures as the imaging picture includes: determining the width of the set lines in each of the image pictures; and taking the image picture to which the set lines with the smallest width belong as the imaging picture.
[0009] Furthermore, determining the width of the set line in each image picture includes: determining the width of the set line at multiple measuring points, where the multiple measuring points are arranged on the set line at intervals along the extension direction of the set line; and determining the width of the set line according to the width at the multiple measuring points.
[0010] In one implementation of the embodiments of the present invention, determining whether the image distortion meets the requirements based on the width of the lines in the imaged picture includes: determining the maximum width value of the lines in the imaged picture; when the maximum width value is not greater than a set threshold, determining that the image distortion meets the requirements; or, when the ratio of the maximum width value to the specified line width is not greater than the set threshold, determining that the image distortion meets the requirements; or, when the difference between the maximum width value and the specified line width is not greater than the set threshold, determining that the image distortion meets the requirements.
[0011] Optionally, determining the maximum width value of the lines in the imaged image includes: acquiring brightness data of the imaged image; determining two edges of each line in the imaged image based on the brightness data; for each line in the imaged image, determining the spacing between the two edges in a direction perpendicular to the extension direction of the line; and using the maximum spacing as the maximum width value of the line.
[0012] Optionally, determining the maximum width value of the lines in the imaged image includes: converting the imaged image into a grayscale image; binarizing the grayscale image to obtain a binary image; determining the number of pixel points in the binary image that are consecutively set values in a direction perpendicular to the extension of each line; and taking the maximum number as the maximum width value of the line.
[0013] In another implementation of the embodiments of the present invention, determining whether the image distortion meets the requirements based on the width of the lines in the imaged picture includes: determining the position corresponding to the maximum width value of the lines in the imaged picture; adjusting the focal length of the image acquisition device so that the image acquisition device focuses on the position corresponding to the maximum width value; determining the focal length of the image acquisition device when it focuses on the position corresponding to the maximum width value; and determining whether the image distortion meets the requirements based on the focal length of the image acquisition device when it focuses on the position corresponding to the maximum width value.
[0014] Furthermore, determining the focal length of the image acquisition device when it is focused on the position corresponding to the maximum width value includes: after the image acquisition device focuses on the position corresponding to the maximum width value, placing a reference object at a position where it can be clearly imaged in the image acquisition device; and determining the distance between the reference object and the set observation point as the focal length of the image acquisition device when it is focused on the position corresponding to the maximum width value.
[0015] Furthermore, determining whether the image distortion meets the requirements based on the focal length of the image acquisition device when it is focused on the position corresponding to the maximum width value includes: when the focal length of the image acquisition device when it is focused on the position corresponding to the maximum width value is within a set range, determining that the image distortion meets the requirements; when the focal length of the image acquisition device when it is focused on the position corresponding to the maximum width value is not within a set range, determining that the image distortion does not meet the requirements.
[0016] Optionally, the image acquisition device is an illuminometer or a charge coupled device camera.
[0017] Optionally, the image output device includes a heads-up display or a holographic image output device.
[0018] On the other hand, an embodiment of the present invention further provides an image distortion detection system, comprising: an image acquisition device, used to shoot a test image output by an image output device to obtain an imaging picture, wherein the imaging picture is a picture taken when the image acquisition device focuses on an imaging position of the image output device, and the image acquisition device is arranged at a set observation point of the image output device; and a control device, used to determine whether the image distortion meets the requirements based on the width of the lines in the imaging picture.
[0019] In one implementation of an embodiment of the present invention, the test image distortion detection system also includes a reference object, which is used to be placed at the imaging position of the image output device, and the distance between the imaging position and the set observation point is equal to the set imaging distance; the image acquisition device is used to focus on the reference object, shoot the test image, and obtain the imaging picture.
[0020] In another implementation of the embodiment of the present invention, the image acquisition device is used to change the focal length at a set interval, and shoot the test image once after each focal length change to obtain multiple image pictures; the control device is used to select the clearest image picture from the multiple image pictures as the imaging picture.
[0021] Optionally, the control device is used to determine the maximum width value of the lines in the imaged image; when the maximum width value is not greater than a set threshold, it is determined that the image distortion meets the requirements; or, when the ratio of the maximum width value to the specified line width is not greater than a set threshold, it is determined that the image distortion meets the requirements; or, when the difference between the maximum width value and the specified line width is not greater than a set threshold, it is determined that the image distortion meets the requirements.
[0022] Optionally, the control device is used to determine the position corresponding to the maximum width value of the line in the imaged picture; adjust the focal length of the image acquisition device so that the image acquisition device focuses on the position corresponding to the maximum width value; determine the focal length of the image acquisition device when it focuses on the position corresponding to the maximum width value; and determine whether the image distortion meets the requirements based on the focal length of the image acquisition device when it focuses on the position corresponding to the maximum width value.
[0023] The technical solution provided by the embodiment of the present invention has the following beneficial effects:
[0024] If the virtual image output by the virtual image output device is distorted in the depth of field direction, the lines in the captured image will become blurred or widened. Therefore, an image acquisition device can be used to capture the image at the imaging position to obtain an image, and the width of the lines in the image can be used to determine whether the image distortion meets the requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 is a flow chart of an image distortion detection method provided by an embodiment of the present invention;
[0027] Figure 2a is a schematic diagram of a grid pattern provided by an embodiment of the present invention;
[0028] Figure 2b is a schematic diagram of an equiangular grid pattern provided by an embodiment of the present invention;
[0029] Figure 3 is a schematic diagram of setting observation points provided by an embodiment of the present invention;
[0030] Figure 4 is a flow chart of another image distortion detection method provided by an embodiment of the present invention;
[0031] Figure 5 is a flow chart of another image distortion detection method provided by an embodiment of the present invention;
[0032] Figure 6 is a structural schematic diagram of a focus position detection method provided by an embodiment of the present invention;
[0033] Figure 7 Schematic diagram of an image distortion detection system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0035] The embodiment of the present invention provides a method for detecting image distortion. Figure 1 is a flow chart of the image distortion detection method, as shown in Figure 1 As shown, the method includes:
[0036] S101: Controlling the image output device to output a test image.
[0037] The test image is an image outputted by an image output device after a test pattern is inputted.
[0038] In this embodiment, the image output device refers to an image output device that outputs images that are not formed on a physical imaging screen, such as a HUD, a holographic image output device, etc. The image output by the image output device can be a virtual image (such as an output image of a HUD) or a real image (such as a holographic image output by a holographic image output device).
[0039] The step S101 may include: lighting up the display source of the image output device and inputting the image data of the test pattern into the display source, so that the image output device outputs the test image. Taking a projection HUD as an example, the projection HUD generally includes a display source, an optical system (not shown) and an imaging screen (generally a car windshield), wherein the display source is used to output a graphic according to the input image data, and the graphic is projected onto the imaging screen through the optical system, and an image is formed on the side of the imaging screen opposite to the side where the display source is located.
[0040] In this embodiment, the test pattern may be a grid pattern. Figure 2a A schematic diagram of a grid pattern provided by an embodiment of the present invention. Figure 2aAs shown, the grid pattern 2 includes a plurality of first straight lines 21 arranged in parallel and spaced apart and a plurality of second straight lines 22 arranged in parallel and spaced apart. The first straight lines and the second straight lines are arranged crosswise, for example, perpendicular to each other. In practical applications, the first straight line extends along a first direction, and the second straight line extends along a second direction. The first direction may be a horizontal direction, and the second direction may be a vertical direction. The grid pattern may cover the entire imaging area of the image output device, and better reflect the distortion of the image output by the image output device. Of course, the extension direction of the first straight line and the second straight line may also be an inclined direction at a set angle to the horizontal direction.
[0041] Furthermore, the grid pattern may be an equidistant grid pattern or an equi-angle grid pattern.
[0042] In the equally spaced grid pattern, the spacing between any two adjacent first straight lines 21 is equal, the spacing between any two adjacent second straight lines 22 is also equal, and the spacing between any two adjacent first straight lines 21 is equal to the spacing between any two adjacent second straight lines 22. In other words, Figure 2a Xn=nX1, where X1 is the spacing between the middle second straight line (denoted as the 0th second straight line) among the plurality of second straight lines and the second straight line adjacent thereto, and Xn is the spacing between the nth second straight line and the 0th second straight line on the side of the 0th second straight line. Y1=X1, and Yn=nY1, where Y1 is the spacing between the middle first straight line (denoted as the 0th first straight line) among the plurality of first straight lines and the first straight line adjacent thereto, and Yn is the spacing between the nth first straight line and the 0th first straight line on the side of the 0th first straight line. When the first direction is the horizontal direction and the second direction is the vertical direction, the 0th first straight line is the horizontal center line of the grid pattern, and the 0th second straight line is the vertical center line of the grid pattern.
[0043] In an equiangular grid, such as Figure 2b As shown, the angle between the observation point O and any two adjacent first straight lines 21 is set to be a fixed angle A, and the angle between the observation point and any two adjacent second straight lines is also set to be a fixed angle A. Figure 2b Only Figure 2a The 0th second straight line in the figure and the 1st second straight line to the right of the 0th second straight line are used as examples for explanation. In practical applications, A is usually 1°. Of course, it can also be set to other values according to actual conditions, such as 0.5°, 1.5°, 2°, etc.
[0044] Furthermore, when A=1°, the distance between each adjacent first straight line and the distance between each adjacent second straight line can be determined according to the following formula:
[0045] Yn=S*tan(n°),
[0046] Xm=S*tan(m°),
[0047] Among them, Yn represents the distance between the nth first straight line on the side of the 0th first straight line and the 0th first straight line, Xm represents the distance between the mth second straight line on the side of the 0th second straight line and the 0th second straight line, and S is a set value.
[0048] When implemented, the equally spaced grid graphics are simpler to produce and the lines are more evenly distributed, so they can better reflect the distortion of the image. Therefore, it is more convenient to use an equally spaced grid.
[0049] In other embodiments, the test pattern may also include a plurality of parallel and spaced lines, and the extension direction of the plurality of parallel and spaced lines may be horizontal, vertical, or inclined at a set angle to the horizontal. In practical applications, the imaging area (i.e., the area capable of displaying an image) of an image output device is usually rectangular, so when the test pattern is a plurality of parallel and spaced lines, the lines extending in an inclined direction can better cover the entire imaging area.
[0050] It should be noted that the widths of the lines in the test pattern are equal, wherein the width of a line is the dimension in a direction perpendicular to the length direction of the line.
[0051] S102: Using an image acquisition device to shoot the test image to obtain an imaging picture.
[0052] The imaging picture is a picture taken when the image acquisition device focuses on the imaging position of the image output device, and the image acquisition device is arranged at a set observation point of the image output device.
[0053] For image output devices, an optimal viewing distance is set, and a rectangular area is set at the optimal viewing distance as the optimal observation area S0, which can be called an eye box. As shown in FIG3, the set observation point can be the center point O of the rectangular area, that is, the intersection of the diagonal lines. For HUD, a closest observation area S1 and a farthest observation area S2 are usually set, and the optimal observation position S0 is located between the closest observation area S1 and the farthest observation area S2. When implemented, the length of the rectangular area is usually 140mm to 160mm, and the width is usually 40mm to 60mm. The horizontal height of the rectangular area can be set according to actual needs. Usually, during the test process, the center point of the rectangular area and the center point of the test image are set at the same horizontal height. Setting the image acquisition device at the set observation point means that the center of the lens of the image acquisition device is located at the set observation point, and the center line of the lens is aligned with the center point of the test image.
[0054] Furthermore, the image acquisition device may be an illuminometer (e.g., BM_7 (chromaticity and brightness tester produced by TOPCON, Japan)) or a charge-coupled device (CCD) camera, etc. By using an illuminometer to capture an image, the brightness data of each pixel in the image can be obtained while acquiring the image, such as the pixel position coordinates and the brightness data corresponding to the pixel position coordinates.
[0055] In one implementation of an embodiment of the present invention, step S102 may include: placing a reference object at the imaging position of the image output device, the distance between the imaging position and the set observation point is equal to the set imaging distance; focusing the image acquisition device on the reference object, shooting the test image, and obtaining the imaging picture.
[0056] This method is suitable for situations where the imaging distance of the image output device is known. By placing a reference object at the imaging position, the image acquisition device can easily focus on the imaging position of the image output device and take pictures, which is convenient and simple to implement.
[0057] Among them, the reference object is provided with a reference figure, which can be a cross-shaped figure, that is, composed of four line segments intersecting at one point, including a line segment extending in the same direction as the first straight line, and the angle between any two adjacent line segments is 45°. For example, in this embodiment, the reference figure is the four diameters of a circle, and the angle between any two adjacent diameters of the four diameters is 45°. Of course, the reference figure can also be other figures, such as any one or a combination of any two of letters, numbers, and words, or any combination of at least one of letters, numbers, and words and lines.
[0058] In practical applications, the reference object may include a base plate and a coating or sticker disposed on one side of the base plate, and the coating or sticker is used to display the reference figure. In other embodiments, the reference object may also be an electronic display screen, and the electronic display screen is used to display the reference figure. In order to facilitate the adjustment of the position of the reference object, a lifting mechanism and / or a translation mechanism may also be provided on the reference object, and the lifting mechanism is used to adjust the height of the reference object in the Y direction (e.g., the vertical direction), and the translation mechanism includes an X-direction translation mechanism and a Z-direction translation mechanism, and the Z direction is the extension direction of the center line of the lens of the image acquisition device, and the X direction is perpendicular to the Y direction and the Z direction. The lifting mechanism and the translation mechanism may adopt any existing mechanism, including but not limited to a gear rack moving mechanism, a lead screw moving mechanism, etc.
[0059] In another implementation of the embodiment of the present invention, step S102 may include: adjusting the focal length of the image acquisition device at set intervals, and shooting the test image after each adjustment to obtain multiple image pictures; and taking the clearest image picture among the multiple image pictures as the imaging picture.
[0060] During implementation, the set interval may be a scale on the lens of the image acquisition device, and the lens is rotated one scale each time the adjustment is performed.
[0061] Furthermore, the method of determining the clearest image picture from a plurality of image pictures may include: determining the width of a set line in each image picture; and using the image picture to which the set line with the smallest width belongs as the imaging picture.
[0062] Further, determining the width of the set line in each image picture includes: determining the width of the set line at multiple measuring points, the multiple measuring points are arranged on the set line at intervals along the extension direction of the set line; and determining the width of the set line according to the width at the multiple measuring points.
[0063] The set line refers to a line at a set position in the image, and there may be at least one set line.
[0064] For example, when the test pattern is a plurality of parallel lines, the set line may be a line in the middle of the plurality of parallel lines. In this case, the average value of the width values at the plurality of measurement points may be used as the width of the set line.
[0065] For another example, when the test pattern is a grid pattern, the set line may include a line located in the middle of the grid pattern in the first direction and a line located in the middle of the second direction, that is, the cross center line of the grid pattern (such as Figure 2a 23 in FIG. 1 ). In this case, the average values of the widths of the multiple measurement points on each line can be calculated as the width of the corresponding line, and then the sum of the widths of the lines or the average value of the widths of the lines can be used as the set line width.
[0066] Of course, you can also select multiple lines in the middle of the test pattern as the setting line. However, usually, the imaging image can be accurately determined only by the width of the center line of the test pattern, and the calculation process is simple, so the center line of the test pattern is often used as the setting line.
[0067] In order to ensure the accuracy of the width of the determined line, the number of measurement points on each line is at least 10 points. For example, when the set line is the cross center line of the grid pattern, the number of measurement points on the set line in the first direction is at least 10 points, and the number of measurement points on the set line in the second direction is also at least 10 points. It should be noted that the number of measurement points on the set line in the first direction and the number of measurement points on the set line in the second direction can be the same or different, and can be set according to actual needs.
[0068] Furthermore, the setting of measurement points on the set lines of the grid figure can be carried out in the following manner: for the set lines extending along the first direction, a measurement point can be set on the set lines between every two adjacent second straight lines; for the set lines extending along the second direction, a measurement point can be set on the set lines between every two adjacent first straight lines.
[0069] This method is applicable to both situations where the imaging distance of the image output device is known and unknown, and can be automatically determined by intelligent devices such as computers, with a high degree of automation.
[0070] In another implementation of the embodiment of the present invention, step S102 may include: manually adjusting the focal length of the image acquisition device and observing the imaging of the test image in the image acquisition device until the image acquisition device focuses on the test image; photographing the test image to obtain the imaging picture.
[0071] S103: Determine whether the image distortion meets the requirement based on the width of the lines in the image.
[0072] If the image has depth of field distortion, the lines captured at the imaging position will become blurred and thicker, that is, the width of the lines will increase. The width of the lines in the image reflects the degree of image distortion. Therefore, the image distortion can be determined based on the width of the lines in the image. Figure 4 and Figure 5 The method shown below will be combined with Figure 4 and Figure 5 Explain them separately.
[0073] Figure 4 Flow chart of an image distortion detection method provided by an embodiment of the present invention. Figure 4 As shown, the method includes:
[0074] S201: Control the image output device to output a test image.
[0075] S202: Using an image acquisition device to shoot the test image to obtain an imaging picture.
[0076] The implementation of steps S201 and S202 may refer to the aforementioned steps S101 and S102, and the detailed description is omitted here.
[0077] S203: Determine the maximum width value of the lines in the imaged picture.
[0078] In the first implementation, step S203 may include: converting the image into a grayscale image; binarizing the grayscale image to obtain a binary image; determining the number of pixel points in the binary image that are continuously set values in the extending direction perpendicular to each line; and using the maximum number as the maximum width value of the line. In this implementation, a CCD camera can be used as an image acquisition device, which is relatively low in cost.
[0079] The grayscale image is binarized, including: comparing the grayscale value of each pixel in the grayscale image with a set threshold, marking the pixel whose grayscale value is greater than the set threshold as a first value (e.g., 1), indicating that the pixel belongs to the line, and marking the pixel whose grayscale value is not greater than the set threshold as a second value (e.g., 0), indicating that the pixel does not belong to the line. The set threshold can be set according to actual conditions, as long as it can distinguish whether the pixel belongs to a line or not.
[0080] Taking the aforementioned grid pattern in which the first straight line and the second straight line are perpendicular to each other and the first direction is the horizontal direction and the second direction is the vertical direction as an example, the number of pixels that are continuously set values in the direction perpendicular to the extension of each line in the binary image can be determined in the following manner: determine the number of pixels that are continuously the first value row by row; determine the number of pixels that are continuously the first value column by column, wherein the row direction is the horizontal direction and the column direction is the vertical direction. It can be seen that by using this grid pattern as a test pattern, the number of pixels that are continuously the first value can be determined by scanning row by row and column by column, which is simple and convenient to implement.
[0081] In a second implementation, step S203 may include: obtaining brightness data of each pixel in the imaged picture; determining two edges of each line in the imaged picture according to the brightness data; for each line in the imaged picture, determining the distance between the two edges in a direction perpendicular to the extension direction of the line; and using the maximum distance as the maximum width value of the line. In this implementation, since the brightness data of the imaged picture needs to be used, an illuminance meter needs to be used as the image acquisition device.
[0082] The two edges of each line can be determined according to the brightness data in the following manner: the brightness ratio of two adjacent pixels in a direction perpendicular to the extension direction of the line is determined; if the ratio is greater than or equal to a set value, the pixel with greater brightness among the two adjacent pixels is determined to be a point on the edge of the line. In practical applications, the set value can be 10.
[0083] S204: judging whether the depth of field distortion meets the requirement according to the maximum width value.
[0084] The step S204 may be implemented in any of the following ways:
[0085] If the ratio of the maximum width value to the specified line width is not greater than the set value, the depth of field distortion meets the requirement; if the ratio of the maximum width value to the specified line width is greater than the set value, the depth of field distortion does not meet the requirement; or,
[0086] If the difference between the maximum width value and the specified line width is not greater than the set value, the depth of field distortion meets the requirement; if the difference between the maximum width value and the specified line width is greater than the set value, the depth of field distortion does not meet the requirement; or,
[0087] If the maximum width value is not greater than the set threshold, the depth of field distortion meets the requirement; if the maximum width value is greater than the set threshold, the depth of field distortion does not meet the requirement.
[0088] The specified line width is the minimum width value or average width of the lines in the imaged image or the width of the set line (for example, the width of the aforementioned cross center line). The minimum width value of the line can refer to the determination method of the aforementioned maximum width value, and the detailed description is omitted here. The determination method of the width of the set line can refer to the relevant description of the aforementioned step S102. The average width of the lines in the imaged image is to process all the lines in the imaged image in the manner of the set lines to obtain the width of each line, and then take the average of all the line widths to obtain the average width of the lines in the imaged image.
[0089] Figure 5 Flow chart of another image distortion detection method provided by an embodiment of the present invention. Figure 5 As shown, the method includes:
[0090] S301: Control the image output device to output a test image.
[0091] S302: Using an image acquisition device to shoot the test image to obtain an imaging picture.
[0092] The implementation of steps S301 and S302 may refer to the aforementioned steps S101 and S102, and the detailed description is omitted here.
[0093] S303: Determine the position corresponding to the maximum width value of the line in the imaged image.
[0094] The implementation of step S303 may refer to the aforementioned step S203, and the detailed description is omitted here.
[0095] S304: Adjust the focal length of the image acquisition device so that the image acquisition device focuses on the position corresponding to the maximum width value.
[0096] Herein, making the image acquisition device focused on the position corresponding to the maximum width value means that the line at the position corresponding to the maximum width value can be clearly imaged in the image acquisition device.
[0097] In one implementation, step S304 may include: adjusting the focal length of the image acquisition device at set intervals, and photographing the test image after each adjustment to obtain multiple image images; determining the width of the line at the position corresponding to the maximum width value; when the difference between the width of the line at the position corresponding to the maximum width value and the aforementioned specified line width does not exceed the set value, determining that the image acquisition device is focused on the position corresponding to the maximum width value. The specified line width may be the minimum width value or average width of the lines in the imaged picture or the width of the set line.
[0098] In another implementation manner, it may be manually determined whether the image acquisition device is focused on the position corresponding to the maximum width value.
[0099] S305: Determine the focal length of the image acquisition device when it focuses on the position corresponding to the maximum width value.
[0100] This step S305 can be implemented in the following manner: after the image acquisition device focuses on the position corresponding to the maximum width value, a reference object is placed at the focus position of the image acquisition device; and the distance from the reference object to the image acquisition device is determined as the focal length when the image acquisition device focuses on the position corresponding to the maximum width value.
[0101] In one implementation, placing the reference object at the focus position of the image acquisition device includes: making the center of the reference object located on the line connecting the center of the test image and the set observation point, adjusting the distance from the reference object to the set observation point, and when a clear image of the reference object is observed, the focal length of the image acquisition device when the image acquisition device is focused on the position corresponding to the maximum width value can be determined according to the position of the reference object. It is simple and convenient to implement by manually observing whether the reference object is located at the focus position of the image acquisition device.
[0102] In another implementation, placing the reference object at the focus position of the image acquisition device includes: making the center of the reference object located on the line connecting the center of the test image and the set observation point, adjusting the distance from the reference object to the set observation point at a set distance interval after the image acquisition device focuses on the position corresponding to the maximum width value, and after each adjustment of the distance from the reference object to the set observation point, the image acquisition device shoots the reference object and the test image to obtain a first image;
[0103] The position of the reference object relative to the test image in the first image is compared with the position of the reference object relative to the test image in the second image. If the position of the reference object relative to the test image in the first image is the same as the position of the reference object relative to the test image in the second image, it means that the reference object is located at the focus position of the image acquisition device, wherein the second image is an image obtained by photographing the reference object and the test image by focusing the image acquisition device at the imaging position when the reference object is located at the imaging position of the image output device.
[0104] For example, assuming that the reference object is a circle, if in the second image, the reference object is tangent to the third line above and below the horizontal center line of the grid pattern and the third line left and right of the vertical center line of the grid pattern, then when in the first image, the reference object is also tangent to the third line above and below the horizontal center line of the grid pattern and the third line left and right of the vertical center line of the grid pattern, it indicates that the reference object is located at the focusing position of the image acquisition device.
[0105] The distance between the reference object and the set observation point can be adjusted at set distance intervals within a certain range before and after the imaging distance of the image output device. Since the depth of field distortion of the image usually occurs before and after the imaging distance, adjusting within a certain range before and after the imaging distance of the image output device can reduce the number of adjustments, so as to quickly determine the focus position of the image acquisition device.
[0106] When implemented, a linear guide rail may be set in the straight line direction where the center of the image acquisition device and the test image are located, and a reference object may be set on the linear guide rail; the reference object may be moved on the linear guide rail to control the position of the reference object relative to the image acquisition device. Figure 6 As shown, the reference object 1 is set on the bracket 1a, and the bracket 1a is set on the linear guide 2. The linear guide 2 is arranged along the line connecting the center of the lens of the image acquisition device 3 and the center of the test image 4. The bracket 1a can move along the linear guide 2, that is, move along the Z direction. The reference object 1 is set on the bracket 1a, and the reference object 1 can move on the bracket 1a along the X direction and the Y direction. When implemented, the position movement of the reference object 1 can be automatic, such as driven by a motor, etc., or manual.
[0107] In one implementation, Figure 6 As shown, a scale 2a may be provided on or near the linear guide rail 2 to facilitate intuitive determination of the distance between the reference object and the image acquisition device. In another implementation, a position sensor may be provided to detect the position of the reference object on the linear guide rail in real time, and determine the distance between the reference object and the image acquisition device based on the detected position.
[0108] S306: Determine whether the depth of field distortion of the test image meets the requirement according to the focal length of the image acquisition device when the image acquisition device focuses on the widest line position.
[0109] The step S306 may include: when the focal length of the image acquisition device when focusing on the position corresponding to the maximum width value is within a set range, determining that the image distortion meets the requirements; when the focal length of the image acquisition device when focusing on the position corresponding to the maximum width value is not within the set range, determining that the image distortion does not meet the requirements.
[0110] The setting range is determined according to the focal length of the image acquisition device when taking the imaging picture. It is usually A ± a, where a is greater than 0, wherein A is the focal length of the image acquisition device when taking the imaging picture, and a is determined according to the distortion requirements of the image output device, and can be set according to actual requirements. The smaller the value of a, the higher the requirement for image distortion.
[0111] In this embodiment, the focal length of the image acquisition device is adjusted based on the widest line in the imaged picture, and whether the depth of field distortion of the image meets the requirements is determined based on the focal length of the image acquisition device when it is focused on the widest line position, thereby achieving the determination of whether the image distortion meets the requirements based on the width of the lines in the imaged picture.
[0112] It should be noted that in the testing method provided by the embodiment of the present invention, the actual physical position of the image acquisition device remains unchanged, and only the focal length of the image acquisition device is adjusted to change the focus position of the image acquisition device.
[0113] The embodiment of the present invention also provides an image distortion detection system. Figure 7 The schematic diagram of the structure of the image distortion detection provided by the embodiment of the present invention is as follows. Figure 7 As shown, the image distortion detection system includes: an image acquisition device 71 and a control device 72. The image acquisition device 71 is used to shoot the test image output by the image output device to obtain an imaged picture, which is a picture taken when the image acquisition device focuses on the imaging position of the image output device, and the image acquisition device 71 is set at a set observation point of the image output device. The control device 72 is used to determine whether the image distortion meets the requirements based on the width of the lines in the imaged picture.
[0114] In one implementation, the image distortion detection system may further include a reference object, which is used to be placed at an imaging position of an image output device, and the distance between the imaging position and the set observation point is equal to the set imaging distance; the image acquisition device 71 is used to focus on the reference object, shoot the test image, and obtain an image picture. This method is suitable for image output devices with known imaging distances.
[0115] In another implementation, the image acquisition device 71 is used to change the focal length at a set interval, and after each focal length change, the test image is photographed once to obtain multiple image pictures; the control device is used to select the clearest image picture from the image pictures as the imaging picture. This method is also applicable to image output devices with known or unknown imaging distances. The specific implementation process of this method can be referred to the aforementioned step S102, which will not be repeated here.
[0116] The control device can determine whether the image distortion meets the requirements in one of the following two ways:
[0117] In the first implementation, the control device 62 is used to determine the maximum width value of the lines in the image; when the maximum width value is not greater than the set threshold, it is determined that the image distortion meets the requirements; or, when the ratio of the maximum width value to the specified line width is not greater than the set threshold, it is determined that the image distortion meets the requirements; or, when the difference between the maximum width value and the specified line width is not greater than the set threshold, it is determined that the image distortion meets the requirements. The specific implementation process of the first implementation can be found in Figure 4 The relevant description of the embodiment shown is omitted here. This implementation method can use image processing technology to determine whether the image distortion meets the requirements, has a high degree of automation, and a simple system structure.
[0118] In a second implementation method, the control device 62 is used to determine the position corresponding to the maximum width value of the line in the imaged picture; adjust the focal length of the image acquisition device so that the image acquisition device focuses on the position corresponding to the maximum width value; determine the focal length of the image acquisition device when it focuses on the position corresponding to the maximum width value; and determine whether the image distortion meets the requirements based on the focal length of the image acquisition device when it focuses on the position corresponding to the maximum width value.
[0119] In the second implementation method, a linear guide rail may be set in the straight line direction between the image acquisition device (i.e., the set observation point) and the center of the test image, and a reference object may be set on the linear guide rail; by moving the reference object on the linear guide rail, the position of the reference object relative to the image acquisition device may be controlled.
[0120] Furthermore, a scale value may be set on or near the linear guide rail to facilitate intuitive determination of the distance between the reference object and the image acquisition device. In another implementation, a position sensor may be provided to detect the position of the reference object on the linear guide rail in real time, and the control device may determine the distance between the reference object and the image acquisition device based on the detected position.
[0121] Furthermore, a focus adjustment device of the image acquisition device may be provided, and the focus adjustment device may rotate the lens of the image acquisition device under the control of the control device, thereby adjusting the focus of the image acquisition device at set intervals.
[0122] The arrangement of image acquisition devices and reference objects can be found in Figure 6 And the related description will not be repeated here.
[0123] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting image distortion, characterized in that: include: Controlling the image output device to output a test image, wherein the test image is an image output by the image output device after inputting a test pattern; Using an image acquisition device to shoot the test image to obtain an imaging picture, wherein the imaging picture is a picture taken when the image acquisition device focuses on the imaging position of the image output device, and the image acquisition device is arranged at a set observation point of the image output device; Determining whether image distortion meets requirements based on the width of lines in the imaged picture; The step of photographing the test image using an image acquisition device to obtain an imaging picture includes: Placing a reference object at an imaging position of the image output device, wherein the distance between the imaging position and the set observation point is equal to the set imaging distance; Focusing the image acquisition device on the reference object, shooting the test image, and obtaining the imaging picture; Alternatively, the use of an image acquisition device to shoot the test image to obtain an imaging picture includes: Adjusting the focal length of the image acquisition device at set intervals, and photographing the test image once after each adjustment to obtain a plurality of image pictures; The clearest image picture is selected from the multiple image pictures as the imaging picture.
2. The image distortion detection method according to claim 1, characterized in that: The test pattern is an equidistant grid pattern.
3. The image distortion detection method according to claim 1, characterized in that: The step of selecting the clearest image from the plurality of image images as the imaging image comprises: Determining the width of a set line in each of the image pictures; The image picture to which the set line with the smallest width belongs is taken as the imaging picture.
4. The image distortion detection method according to claim 3, characterized in that: The step of determining the width of a set line in each of the image pictures includes: Determining the width of the set line at a plurality of measuring points, wherein the plurality of measuring points are arranged on the set line at intervals along an extension direction of the set line; The width of the set line is determined according to the widths at a plurality of measuring points.
5. The image distortion detection method according to any one of claims 1 to 4, characterized in that: The determining whether the image distortion meets the requirement based on the width of the lines in the imaged picture includes: Determine the maximum width value of the lines in the imaged picture; When the maximum width value is not greater than the set threshold, it is determined that the image distortion meets the requirement; or, When the ratio of the maximum width value to the specified line width is not greater than a set threshold, it is determined that the image distortion meets the requirement; or, When the difference between the maximum width value and the specified line width is not greater than a set threshold, it is determined that the image distortion meets the requirement.
6. The image distortion detection method according to claim 5, characterized in that: The determining the maximum width value of the lines in the imaged picture includes: Acquiring brightness data of the imaging picture; Determine two edges of each line in the imaged picture according to the brightness data; For each line in the imaged picture, determining the distance between two edges in a direction perpendicular to the extending direction of the line; Set the maximum spacing to the maximum width of the line.
7. The image distortion detection method according to claim 5, characterized in that: The determining the maximum width value of the lines in the imaged picture includes: Converting the image into a grayscale image; Binarizing the grayscale image to obtain a binary image; Determine the number of pixel points in the binary image that are consecutively set values in a direction perpendicular to the extension of each line; The maximum number is used as the maximum width value of the line.
8. The image distortion detection method according to any one of claims 1 to 4, characterized in that: The determining whether the image distortion meets the requirement based on the width of the lines in the imaged picture includes: Determine the position corresponding to the maximum width value of the line in the imaged picture; Adjusting the focal length of the image acquisition device so that the image acquisition device focuses on the position corresponding to the maximum width value; determining a focal length of the image acquisition device when the image acquisition device is focused on a position corresponding to the maximum width value; Whether the image distortion meets the requirement is determined according to the focal length of the image acquisition device when it focuses on the position corresponding to the maximum width value.
9. The image distortion detection method according to claim 8, characterized in that: The determining of the focal length of the image acquisition device when it focuses on the position corresponding to the maximum width value includes: After the image acquisition device focuses on the position corresponding to the maximum width value, placing a reference object at the focus position of the image acquisition device; The distance from the reference object to the set observation point is determined as the focal length of the image acquisition device when it focuses on the position corresponding to the maximum width value.
10. The image distortion detection method according to claim 8, characterized in that: The determining whether the image distortion meets the requirement according to the focal length of the image acquisition device when focusing on the position corresponding to the maximum width value includes: When the focal length of the image acquisition device when focusing on the position corresponding to the maximum width value is within a set range, it is determined that the image distortion meets the requirement; When the focal length of the image acquisition device when focusing on the position corresponding to the maximum width value is not within a set range, it is determined that the image distortion does not meet the requirement.
11. The image distortion detection method according to any one of claims 1 to 4, characterized in that: The image acquisition device is an illuminometer or a charge coupled device camera.
12. The image distortion detection method according to any one of claims 1 to 4, characterized in that: The image output device includes a head-up display or a holographic image output device.
13. An image distortion detection system, characterized in that: include: An image acquisition device, used to capture the test image output by the image output device to obtain an imaged picture, wherein the imaged picture is captured when the image acquisition device focuses on the imaging position of the image output device, and the image acquisition device is disposed at a set observation point of the image output device; A control device, used to determine whether the image distortion meets the requirements based on the width of the lines in the imaged picture; The image acquisition device is used to: after placing the reference object at the imaging position of the image output device and making the distance between the imaging position and the set observation point equal to the set imaging distance, focus on the reference object, shoot the test image, and obtain the imaging picture; Alternatively, the image acquisition device is used to: change the focal length at set intervals, and shoot the test image once after each focal length change to obtain multiple image pictures; the control device is used to select the clearest image picture from the multiple image pictures as the imaging picture.
14. The image distortion detection system according to claim 13, characterized in that: The control device is used to determine the maximum width value of the lines in the imaged image; when the maximum width value is not greater than a set threshold, it is determined that the image distortion meets the requirements; or, when the ratio of the maximum width value to the specified line width is not greater than the set threshold, it is determined that the image distortion meets the requirements; or, when the difference between the maximum width value and the specified line width is not greater than the set threshold, it is determined that the image distortion meets the requirements.
15. The image distortion detection system according to claim 13, characterized in that: The control device is used to determine the position corresponding to the maximum width value of the line in the imaged picture; adjust the focal length of the image acquisition device so that the image acquisition device focuses on the position corresponding to the maximum width value; and determine the focal length of the image acquisition device when it focuses on the position corresponding to the maximum width value; Whether the image distortion meets the requirement is determined according to the focal length of the image acquisition device when it focuses on the position corresponding to the maximum width value.
Citation Information
Patent Citations
Method of processing image and apparatus for the same
CN102592264A
Distortion correction method and projector
JP2005295328A