Reflective marker quality evaluation method, device, equipment and storage medium
By calculating the roundness and brightness of the reflective marker's spot area, its quality is evaluated, thus solving the problem of inaccurate positioning caused by brightness and shape issues and ensuring precise navigation of surgical instruments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2026-03-17
AI Technical Summary
Reflective markers may develop quality issues such as overall dimming, localized darkening, or non-roundness due to prolonged storage or cleaning, making accurate positioning difficult and affecting the precise navigation of surgical instruments.
By acquiring images of reflective markers taken by a camera, the area of the light spot is determined, the roundness and brightness of the light spot area are calculated, and the quality of the reflective markers is evaluated based on the brightness and roundness, providing a quality assessment result.
It enables quality assessment of reflective markers to determine whether they can continue to be used, thus avoiding inaccurate positioning due to quality issues.
Smart Images

Figure CN115830109B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of optical positioning technology, and in particular to a method, apparatus, device and storage medium for evaluating the quality of reflective markers. Background Technology
[0002] Binocular vision positioning systems are based on the principle of parallax, similar to human eyes, by fixing two cameras at a certain distance and angle to the same rigid body. During operation, each camera acquires a mapped image of the same feature point within its field of view. Then, based on the placement of the two cameras and the positions of the feature points obtained in the images, the specific location of the feature point in three-dimensional space is calculated using the principle of triangulation.
[0003] Specifically, a binocular vision positioning system can be a set of two infrared cameras (infrared-based binocular vision positioning systems belong to the category of optical positioning systems). Infrared LEDs are fixed around the optical axes of the two cameras for illumination. The infrared light emitted by the LEDs is reflected back to the camera's photosensitive chip by reflective markers (e.g., reflective balls) on surgical instruments or rigid tools. The cameras capture images of the reflective markers, and with computer assistance, digital image processing technology is used to identify and locate the reflective markers. Based on the three-dimensional coordinates of the reflective markers, the coordinates and direction of the surgical instrument tip can be determined, thereby achieving precise surgical navigation.
[0004] However, the inventors discovered that reflective markers, as accessories, can develop quality issues such as overall dimming, localized darkening, and non-roundness due to prolonged storage or cleaning. These quality issues make it difficult to accurately position the reflective markers, hindering the precise marking of the needle tip coordinates and direction of surgical instruments, and consequently, making accurate hand gesture navigation difficult. Summary of the Invention
[0005] To address the aforementioned technical problems, the purpose of this application is to provide a method for evaluating the quality of reflective markers, which aims to score the quality of reflective markers and determine whether they can continue to be used.
[0006] In a first aspect, embodiments of this application provide a method for evaluating the quality of reflective markers, including:
[0007] Acquire images of reflective markers taken by a camera;
[0008] Identify the light spot region in the image;
[0009] Calculate the roundness of the light spot region;
[0010] Calculate the brightness of the light spot region;
[0011] The quality of the reflective marker is evaluated based on the brightness and roundness of the light spot area, resulting in a quality evaluation result for the reflective marker.
[0012] Furthermore, if the image is a grayscale image, then determining the light spot region in the image includes:
[0013] Traverse all pixels in the image and obtain the connected regions composed of pixels whose gray values are greater than a first set threshold by using a threshold determination method;
[0014] The connected region is defined as the spot region in the image.
[0015] Furthermore, if the image is a color image, then determining the light spot region in the image includes:
[0016] Convert the image to a grayscale image;
[0017] Traverse all pixels in the grayscale image and obtain the connected regions composed of pixels whose grayscale values are greater than a first set threshold by using a threshold determination method;
[0018] The connected region is defined as the spot region in the image.
[0019] Furthermore, calculating the roundness of the light spot region includes:
[0020] Calculate the perimeter and area of the light spot region;
[0021] The roundness of the light spot region is calculated based on the perimeter and area of the light spot region.
[0022] Furthermore, calculating the brightness of the light spot region includes:
[0023] Count the number of pixels in the light spot region whose gray value is greater than a second set threshold;
[0024] Count the number of pixels in the light spot region whose gray values are between a third set threshold and a second set threshold;
[0025] Count the number of pixels in the light spot region whose gray values are between a first set threshold and a third set threshold;
[0026] The brightness of the spot region is calculated based on the number of pixels in the spot region whose gray values are greater than a second set threshold, the number of pixels in the spot region whose gray values are between a third set threshold and a second set threshold, and the number of pixels in the spot region whose gray values are between a first set threshold and a third set threshold.
[0027] Furthermore, calculating the brightness of the light spot region based on the number of pixels in the light spot region with gray values greater than a second preset threshold, the number of pixels in the light spot region with gray values between a third preset threshold and a second preset threshold, and the number of pixels in the light spot region with gray values between a first preset threshold and a third preset threshold includes:
[0028] The brightness of the light spot region is calculated according to the formula L=(A*2+B*1.5) / ((A+B+C)*1.5); where A represents the number of pixels in the light spot region with gray values greater than the second set threshold, B represents the number of pixels in the light spot region with gray values between the third set threshold and the second set threshold, and C represents the number of pixels in the light spot region with gray values between the first set threshold and the third set threshold.
[0029] Furthermore, the step of evaluating the quality of the reflective marker based on the brightness and roundness of the light spot area to obtain the quality evaluation result of the reflective marker includes:
[0030] Determine whether the brightness of the light spot region is greater than a fourth preset threshold and whether the roundness of the light spot region is greater than a fifth preset threshold;
[0031] If yes, the reflective marker is deemed to be of acceptable quality; otherwise, the reflective marker is deemed to be of unacceptable quality.
[0032] Furthermore, before acquiring the image of the reflective marker by the camera, the process also includes:
[0033] The reflective markers are illuminated using a lighting device.
[0034] Furthermore, the reflectivity of the reflective marker is greater than the reflectivity of the background in which the reflective marker is located when it is photographed by the camera.
[0035] Furthermore, before acquiring the image of the reflective marker by the camera, the process also includes:
[0036] Adjust the camera's exposure parameters until the maximum grayscale value of the image captured by the camera of the reflective marker is within a preset range.
[0037] Furthermore, the method for evaluating the quality of reflective markers further includes:
[0038] When the camera simultaneously captures images of multiple reflective markers, the light spot areas formed by each reflective marker on the image are marked.
[0039] The relationship between the light spot area and the reflective marker is determined based on the two-dimensional coordinates of the light spot area on the image and the three-dimensional coordinates of the reflective marker in space.
[0040] When a quality assessment is completed for each reflective marker, the quality assessment result for each reflective marker is determined based on the marking of the light spot area and the relationship between the light spot area and the reflective marker.
[0041] Secondly, embodiments of this application provide a reflective marker quality assessment device, comprising:
[0042] The acquisition module is used to acquire images of reflective markers captured by the camera;
[0043] The determination module is used to determine the light spot region in the image;
[0044] A roundness calculation module is used to calculate the roundness of the light spot region;
[0045] A brightness calculation module is used to calculate the brightness of the light spot area;
[0046] The quality assessment module is used to assess the quality of the reflective marker based on the brightness and roundness of the light spot area, and obtain the quality assessment result of the reflective marker.
[0047] Thirdly, embodiments of this application provide a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods described above.
[0048] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the preceding claims.
[0049] This application provides a method for evaluating the quality of reflective markers. The method involves acquiring an image of the reflective marker taken by a camera; determining a light spot region in the image; calculating the roundness of the light spot region; calculating the brightness of the light spot region; and evaluating the quality of the reflective marker based on the brightness and roundness of the light spot region. This allows for the determination of whether the reflective marker can continue to be used. Attached Figure Description
[0050] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0051] Figure 1 This is a diagram illustrating the field of vision in which reflective markers can be placed;
[0052] Figure 2 This is a schematic diagram of a binocular vision positioning system;
[0053] Figure 3 This is a flowchart illustrating a method for evaluating the quality of reflective markers provided in an embodiment of this application;
[0054] Figure 4 This is a schematic diagram of the structure of a reflective marker quality assessment device provided in an embodiment of this application;
[0055] Figure 5 This is a schematic block diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation
[0056] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0057] Example 1:
[0058] This application provides a method for evaluating the quality of reflective markers. Before implementing this application, it is necessary to ensure that there are no other interference points or sources within the camera's field of view. Specifically, the space within the camera's field of view is first illuminated by a lighting device. Then, under illumination, an image within the camera's field of view is captured by the camera. The brightness of the space within the camera's field of view is adjusted to ensure that the grayscale value of all points in the image is less than a first set threshold, for example, the first set threshold is 50 (this value is determined based on experience and can be adjusted appropriately). The camera can be a monocular camera, a binocular camera, or a multi-view camera, depending on the number of cameras. It can also be a color camera or a monochrome camera, depending on the color of the image. The lighting device includes a light source. If the light source is an infrared light source, the lighting device also includes a filter. The camera and the lighting device can be integrated into a system. For example, a near-infrared binocular vision positioning system integrates a binocular camera and a lighting device including an infrared light source, such as... Figure 2 As shown.
[0059] Second, adjust the position of the reflective marker: Place the reflective marker within the camera's field of view. Exemplarily, collect its coordinates through the camera, and keep its coordinates at a position 0.9 - 1.1 meters away from the camera, with a deviation not exceeding 0.1 meter from the center of the camera's field of view (the central axis of the field of view), that is, place it Figure 1 within the area shown. If the camera coordinate system is as Figure 2 shown, then the coordinate range where the reflective marker is placed is: -100mm < x < 100mm, -100mm < y < 100mm, 900mm < z < 1100mm. It should be noted that the reflective marker can be a reflective ball, a reflective marker ball, or a reflective mark.
[0060] Third, adjust the exposure value of the camera: Illuminate the reflective marker through the lighting device, and use the camera to take a picture of the reflective marker to obtain an image. Obtain the point with the maximum gray value in this image. If the point with the maximum gray value is equal to 255, then reduce the exposure value of the camera. If the point with the maximum gray value is less than 230 (this value is determined according to experience, about 90% of 255, and can be appropriately adjusted), then increase the exposure value of the camera until the gray value G of the point with the maximum gray value satisfies 230 < G < 255, and obtain the final exposure parameter. It should be noted that after obtaining the final exposure parameter, if the factors of the environment where the reflective marker is photographed remain unchanged, for example, the brightness and darkness of the environment remain unchanged, then for any reflective marker, it can be photographed using the camera under this exposure parameter, without adjusting the exposure parameter of the camera due to the difference of the reflective marker.
[0061] Please refer to Figure 3 , a method for evaluating the quality of a reflective marker provided by an embodiment of the present application, includes steps S1 - S5:
[0062] S1. Obtain the image obtained by the camera taking a picture of the reflective marker;
[0063] S2. Determine the light spot area in the image;
[0064] S3. Calculate the roundness of the light spot area;
[0065] S4. Calculate the brightness of the light spot area;
[0066] S5. Evaluate the quality of the reflective marker according to the brightness of the light spot area and the roundness of the light spot area, and obtain the quality evaluation result of the reflective marker. ,
[0067] In the embodiments of this application, it should be understood that before acquiring the image of the reflective marker by the camera, the reflective marker is illuminated. Thus, according to the principle of reflection, the image of the reflective marker on the camera appears as a light spot. Therefore, by treating the light spot area as the processing object, the characteristics of the reflective marker can be indirectly reflected.
[0068] This application embodiment acquires an image of a reflective marker by a camera; determines the light spot area in the image; calculates the roundness of the light spot area; calculates the brightness of the light spot area; and evaluates the quality of the reflective marker based on the brightness and roundness of the light spot area. This allows for a quality evaluation result of the reflective marker, which can then be used to determine its continued usability. Furthermore, by retaining qualified reflective markers and filtering out unqualified ones based on the evaluation result, inaccurate positioning due to the quality of the reflective marker itself is avoided.
[0069] In one embodiment, if the image is a grayscale image, then determining the spot region in the image includes:
[0070] Traverse all pixels in the image and obtain the connected regions composed of pixels whose gray values are greater than a first set threshold by using a threshold determination method;
[0071] The connected region is defined as the spot region in the image.
[0072] In this embodiment, the first set threshold is used to ensure that there are no interference points or sources within the field of view. For example, the first set threshold is 50, which is an empirical value and can be adjusted appropriately according to actual conditions.
[0073] In one embodiment, if the image is a color image, then determining the light spot region in the image includes:
[0074] Convert the image to a grayscale image;
[0075] Traverse all pixels in the grayscale image and obtain the connected regions composed of pixels whose grayscale values are greater than a first set threshold by using a threshold determination method;
[0076] The connected region is defined as the spot region in the image.
[0077] In this embodiment, the first set threshold is used to ensure that there are no interference points or sources within the field of view. For example, the first set threshold is 50, which is an empirical value and can be adjusted appropriately according to actual conditions.
[0078] In one embodiment, calculating the roundness of the light spot region includes:
[0079] Calculate the perimeter and area of the light spot region;
[0080] The roundness of the light spot region is calculated based on the perimeter and area of the light spot region.
[0081] In this embodiment of the application, when calculating the roundness of the light spot area, it can be specifically based on the formula. Calculated.
[0082] In one embodiment, calculating the brightness of the light spot region includes:
[0083] Count the number of pixels in the light spot region whose gray value is greater than a second set threshold;
[0084] Count the number of pixels in the light spot region whose gray values are between a third set threshold and a second set threshold;
[0085] Count the number of pixels in the light spot region whose gray values are between a first set threshold and a third set threshold;
[0086] The brightness of the spot region is calculated based on the number of pixels in the spot region whose gray values are greater than a second set threshold, the number of pixels in the spot region whose gray values are between a third set threshold and a second set threshold, and the number of pixels in the spot region whose gray values are between a first set threshold and a third set threshold.
[0087] In this embodiment, specifically, the second set threshold is 200, the third set threshold is 150, and the first set threshold is 50. Therefore, it is necessary to count the number of pixels in the spot area with a gray value greater than 200, the number of pixels in the spot area with a gray value between 150 and 200, and the number of pixels in the spot area with a gray value between 50 and 150. After the statistics are completed, the brightness of the spot area is calculated based on the number of pixels in the spot area with a gray value greater than 200, the number of pixels in the spot area with a gray value between 150 and 200, and the number of pixels in the spot area with a gray value between 50 and 150.
[0088] This application embodiment calculates the brightness of the spot area by counting the number of pixels in the spot area whose gray values are greater than a second set threshold; counting the number of pixels in the spot area whose gray values are between a third set threshold and a second set threshold; counting the number of pixels in the spot area whose gray values are between a first set threshold and a third set threshold; and calculating the brightness of the spot area based on the number of pixels in the spot area whose gray values are greater than the second set threshold, the number of pixels in the spot area whose gray values are between the third set threshold and the second set threshold, and the number of pixels in the spot area whose gray values are between the first set threshold and the third set threshold. In this way, the brightness of the spot area can be obtained, and the obtained brightness of the spot area is closer to the actual brightness of the spot area.
[0089] In one embodiment, calculating the brightness of the light spot region based on the number of pixels in the light spot region with gray values greater than a second preset threshold, the number of pixels in the light spot region with gray values between a third preset threshold and a second preset threshold, and the number of pixels in the light spot region with gray values between a first preset threshold and a third preset threshold includes:
[0090] The brightness of the light spot region is calculated according to the formula L=(A*2+B*1.5) / ((A+B+C)*1.5); where A represents the number of pixels in the light spot region with a gray value greater than the second set threshold, B represents the number of pixels in the light spot region with a gray value between the third set threshold and the second set threshold, and C represents the number of pixels in the light spot region with a gray value between the third set threshold and the third set threshold.
[0091] In the embodiments of this application, it should be understood that when the second set threshold is 200, the third set threshold is 150, and the first set threshold is 50, the brightness of the spot area can be obtained by substituting the number of pixels with a gray value greater than 200, the number of pixels with a gray value between 150 and 200, and the number of pixels with a gray value between 50 and 150 in the spot area into the formula L = (A*2 + B*1.5) / ((A+B+C)*1.5).
[0092] In one embodiment, evaluating the quality of the reflective marker based on the brightness and roundness of the light spot area to obtain a quality evaluation result for the reflective marker includes:
[0093] Determine whether the brightness of the light spot region is greater than a fourth preset threshold and whether the roundness of the light spot region is greater than a fifth preset threshold;
[0094] If yes, the reflective marker is deemed to be of acceptable quality; otherwise, the reflective marker is deemed to be of unacceptable quality.
[0095] In this embodiment of the application, specifically, the fourth set threshold is 0.75, and the fifth set threshold is 0.85. When the brightness of the light spot area is greater than 0.75 and the roundness of the light spot area is greater than 0.85, the reflective marker is determined to be qualified; otherwise, the reflective marker is determined to be unqualified.
[0096] In one embodiment, before acquiring an image of the reflective marker taken by the camera, the method further includes:
[0097] The reflective markers are illuminated using a lighting device.
[0098] In one embodiment, the reflectivity of the reflective marker is greater than the reflectivity of the background in which the reflective marker is located when it is photographed by the camera.
[0099] In this embodiment of the invention, the background of the reflective marker is a non-reflective background. It should be understood that non-reflective does not mean completely non-reflective, but rather has a low reflectivity. Furthermore, when the reflective marker is photographed, it can be fixed to a board. Preferably, the surface of the board can be covered with a thin film made of a light-absorbing material. Preferably, the board can also be made of a light-absorbing material.
[0100] In one embodiment, before acquiring an image of the reflective marker taken by the camera, the method further includes:
[0101] Adjust the camera's exposure parameters until the maximum grayscale value of the image captured by the camera of the reflective marker is within a preset range.
[0102] This application embodiment adjusts the camera's exposure parameters until the maximum grayscale value of the image captured by the camera on the reflective marker is within the preset range, enabling the image captured by the camera to meet the quality assessment of the reflective marker based on the spot area.
[0103] In one embodiment, the reflective marker quality assessment method further includes:
[0104] When the camera simultaneously captures images of multiple reflective markers, the light spot areas formed by each reflective marker on the image are marked.
[0105] The relationship between the light spot area and the reflective marker is determined based on the two-dimensional coordinates of the light spot area on the image and the three-dimensional coordinates of the reflective marker in space.
[0106] When a quality assessment is completed for each reflective marker, the quality assessment result for each reflective marker is determined based on the marking of the light spot area and the relationship between the light spot area and the reflective marker.
[0107] In this embodiment of the application, when it is necessary to score the quality of multiple reflective markers, the multiple reflective markers can be placed on a board. For example, a board that can hold 5*5 reflective markers can be designed and fixed within the camera's field of view. Then, the quality assessment of multiple reflective markers can be completed in one shot, and the score of each reflective marker can be obtained.
[0108] Example 2:
[0109] Please see Figure 4 This application provides a reflective marker quality assessment device, comprising:
[0110] Acquisition module 1 is used to acquire images of reflective markers captured by the camera;
[0111] Determining module 2 is used to determine the light spot region in the image;
[0112] Roundness calculation module 3 is used to calculate the roundness of the light spot area;
[0113] Brightness calculation module 4 is used to calculate the brightness of the light spot area;
[0114] The quality assessment module 5 is used to assess the quality of the reflective marker based on the brightness and roundness of the light spot area, and obtain the quality assessment result of the reflective marker.
[0115] In one embodiment, if the image is a grayscale image, then the determining module 2 is specifically used for:
[0116] Traverse all pixels in the image and obtain the connected regions composed of pixels whose gray values are greater than a first set threshold by using a threshold determination method;
[0117] The connected region is defined as the spot region in the image.
[0118] In one embodiment, if the image is a color image, then the determining module 2 is specifically used to: convert the image into a grayscale image;
[0119] Traverse all pixels in the grayscale image and obtain the connected regions composed of pixels whose grayscale values are greater than a first set threshold by using a threshold determination method;
[0120] The connected region is defined as the spot region in the image.
[0121] In one embodiment, the roundness calculation module 3 is specifically used for:
[0122] Calculate the perimeter and area of the light spot region;
[0123] The roundness of the light spot region is calculated based on the perimeter and area of the light spot region.
[0124] In one embodiment, the brightness calculation module 4 is specifically used for:
[0125] Count the number of pixels in the light spot region whose gray value is greater than a second set threshold;
[0126] Count the number of pixels in the light spot region whose gray values are between a third set threshold and a second set threshold;
[0127] Count the number of pixels in the light spot region whose gray values are between a first set threshold and a third set threshold;
[0128] The brightness of the spot region is calculated based on the number of pixels in the spot region whose gray values are greater than a second set threshold, the number of pixels in the spot region whose gray values are between a third set threshold and a second set threshold, and the number of pixels in the spot region whose gray values are between a first set threshold and a third set threshold.
[0129] In one embodiment, calculating the brightness of the light spot region based on the number of pixels in the light spot region with gray values greater than a second preset threshold, the number of pixels in the light spot region with gray values between a third preset threshold and a second preset threshold, and the number of pixels in the light spot region with gray values between a first preset threshold and a third preset threshold includes:
[0130] The brightness of the light spot region is calculated according to the formula L=(A*2+B*1.5) / ((A+B+C)*1.5); where A represents the number of pixels in the light spot region with gray values greater than the second set threshold, B represents the number of pixels in the light spot region with gray values between the third set threshold and the second set threshold, and C represents the number of pixels in the light spot region with gray values between the first set threshold and the second set threshold.
[0131] In one embodiment, the quality assessment module 5 is specifically used for:
[0132] Determine whether the brightness of the light spot region is greater than a fourth preset threshold and whether the roundness of the light spot region is greater than a fifth preset threshold;
[0133] If yes, the reflective marker is deemed to be of acceptable quality; otherwise, the reflective marker is deemed to be of unacceptable quality.
[0134] In one embodiment, before acquiring an image of the reflective marker taken by the camera, the method further includes:
[0135] The reflective markers are illuminated using a lighting device.
[0136] In one embodiment, the reflectivity of the reflective marker is greater than the reflectivity of the background in which the reflective marker is located when it is photographed by the camera.
[0137] In one embodiment, before acquiring an image of the reflective marker taken by the camera, the method further includes:
[0138] Adjust the camera's exposure parameters until the maximum grayscale value of the image captured by the camera of the reflective marker is within a preset range.
[0139] In one embodiment, the reflective marker quality assessment device further includes:
[0140] The module for determining the quality assessment results of each reflective marker is used for
[0141] When the camera simultaneously captures images of multiple reflective markers, the light spot areas formed by each reflective marker on the image are marked.
[0142] The relationship between the light spot area and the reflective marker is determined based on the two-dimensional coordinates of the light spot area on the image and the three-dimensional coordinates of the reflective marker in space.
[0143] When a quality assessment is completed for each reflective marker, the quality assessment result for each reflective marker is determined based on the marking of the light spot area and the relationship between the light spot area and the reflective marker.
[0144] Example 3:
[0145] Reference Figure 5 This application also provides a computer device, which may be a server, and its internal structure may be as follows: Figure 5As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores data applicable to a reflective marker quality assessment method. The network interface is used to communicate with external terminals via a network connection. When executed by the processor, the computer program implements a reflective marker quality assessment method, including: acquiring an image of the reflective marker taken by a camera; determining a spot area in the image; calculating the roundness of the spot area; calculating the brightness of the spot area; and assessing the quality of the reflective marker based on the brightness and roundness of the spot area to obtain a quality assessment result for the reflective marker.
[0146] This application provides a method for evaluating the quality of reflective markers. The method involves acquiring an image of the reflective marker taken by a camera; determining a light spot region in the image; calculating the roundness of the light spot region; calculating the brightness of the light spot region; and evaluating the quality of the reflective marker based on the brightness and roundness of the light spot region. This allows for the determination of whether the reflective marker can continue to be used.
[0147] Example 4:
[0148] This application embodiment also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements a method for evaluating the quality of reflective markers, including the steps of: acquiring an image of a reflective marker captured by a camera; determining a spot area in the image; calculating the roundness of the spot area; calculating the brightness of the spot area; evaluating the quality of the reflective marker based on the brightness and roundness of the spot area, and obtaining a quality evaluation result for the reflective marker.
[0149] This application provides a method for evaluating the quality of reflective markers. The method involves acquiring an image of the reflective marker taken by a camera; determining a light spot region in the image; calculating the roundness of the light spot region; calculating the brightness of the light spot region; and evaluating the quality of the reflective marker based on the brightness and roundness of the light spot region. This allows for the determination of whether the reflective marker can continue to be used.
[0150] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media provided in this application and in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0151] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0152] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for evaluating the quality of reflective markers, characterized in that, include: Acquire images of reflective markers taken by a camera; Identify the light spot region in the image; Calculate the roundness of the light spot region; Calculate the brightness of the light spot region; The quality of the reflective marker is evaluated based on the brightness and roundness of the light spot area, and the quality evaluation result of the reflective marker is obtained. The calculation of the brightness of the light spot region includes: Count the number of pixels in the light spot region whose gray value is greater than a second set threshold; Count the number of pixels in the light spot region whose gray values are between a third set threshold and a second set threshold; Count the number of pixels in the light spot region whose gray values are between a first set threshold and a third set threshold; The brightness of the light spot region is calculated according to the formula L=(A*2+B*1.5) / ((A+B+C)*1.5); where A represents the number of pixels in the light spot region with gray values greater than the second set threshold, B represents the number of pixels in the light spot region with gray values between the third set threshold and the second set threshold, and C represents the number of pixels in the light spot region with gray values between the first set threshold and the third set threshold.
2. The method for evaluating the quality of reflective markers according to claim 1, characterized in that, If the image is a grayscale image, then determining the spot region in the image includes: Traverse all pixels in the image and obtain the connected regions composed of pixels whose gray values are greater than a first set threshold by using a threshold determination method; The connected region is defined as the spot region in the image.
3. The method for evaluating the quality of reflective markers according to claim 1, characterized in that, If the image is a color image, then determining the light spot region in the image includes: Convert the image to a grayscale image; Traverse all pixels in the grayscale image and obtain the connected regions composed of pixels whose grayscale values are greater than a first set threshold by using a threshold determination method; The connected region is defined as the spot region in the image.
4. The method for evaluating the quality of reflective markers according to claim 1, characterized in that, The calculation of the roundness of the light spot region includes: Calculate the perimeter and area of the light spot region; The roundness of the light spot region is calculated based on the perimeter and area of the light spot region.
5. The method for evaluating the quality of reflective markers according to claim 1, characterized in that, The quality assessment of the reflective marker is performed based on the brightness and roundness of the light spot area to obtain the quality assessment result of the reflective marker, including: Determine whether the brightness of the light spot region is greater than a fourth preset threshold and whether the roundness of the light spot region is greater than a fifth preset threshold; If yes, the reflective marker is deemed to be of acceptable quality; otherwise, the reflective marker is deemed to be of unacceptable quality.
6. The method for evaluating the quality of reflective markers according to claim 1, characterized in that, Before acquiring an image of the reflective marker taken by the camera, the process also includes: The reflective markers are illuminated using a lighting device.
7. The method for evaluating the quality of reflective markers according to claim 1, characterized in that, The reflectivity of the reflective marker is greater than the reflectivity of the background in which the reflective marker is located when it is photographed by the camera.
8. The method for evaluating the quality of reflective markers according to claim 1, characterized in that, Before acquiring an image of the reflective marker taken by the camera, the process also includes: Adjust the camera's exposure parameters until the maximum grayscale value of the image captured by the camera of the reflective marker is within a preset range.
9. The method for evaluating the quality of reflective markers according to any one of claims 1-8, characterized in that, Also includes: When the camera simultaneously captures images of multiple reflective markers, the light spot areas formed by each reflective marker on the image are marked. The relationship between the light spot area and the reflective marker is determined based on the two-dimensional coordinates of the light spot area on the image and the three-dimensional coordinates of the reflective marker in space. When a quality assessment is completed for each reflective marker, the quality assessment result for each reflective marker is determined based on the marking of the light spot area and the relationship between the light spot area and the reflective marker.
10. A device for evaluating the quality of reflective markers, characterized in that, include: The acquisition module is used to acquire images of reflective markers captured by the camera. The determination module is used to determine the light spot region in the image; A roundness calculation module is used to calculate the roundness of the light spot region; A brightness calculation module is used to calculate the brightness of the light spot area; The quality assessment module is used to assess the quality of the reflective marker based on the brightness and roundness of the light spot area, and obtain the quality assessment result of the reflective marker. The calculation of the brightness of the light spot region includes: Count the number of pixels in the light spot region whose gray value is greater than a second set threshold; Count the number of pixels in the light spot region whose gray values are between a third set threshold and a second set threshold; Count the number of pixels in the light spot region whose gray values are between a first set threshold and a third set threshold; The brightness of the light spot region is calculated according to the formula L=(A*2+B*1.5) / ((A+B+C)*1.5); where A represents the number of pixels in the light spot region with gray values greater than the second set threshold, B represents the number of pixels in the light spot region with gray values between the third set threshold and the second set threshold, and C represents the number of pixels in the light spot region with gray values between the first set threshold and the third set threshold.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Pavement marking measuring method
CN111192309A