A spot recognition method and system based on edge extraction

Through the spot recognition method based on edge extraction, the parameters are adjusted adaptively and the spot center is clustered to obtain the spot center error, which solves the problem of spot center recognition error in complex lighting environments, and improves the accuracy and applicability of the recognition.

CN115131576BActive Publication Date: 2025-05-27NINGBO GOLONG ROBOT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210711955.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-22
Publication Date
2025-05-27
Estimated Expiration
2042-06-22

AI Technical Summary

Technical Problem

The complex lighting environment affects the image quality of the spot, resulting in errors in the center of the spot.

Method used

The spot center is obtained by using edge extraction to obtain the initial image, generate grayscale maps, sort and set thresholds, and cluster, and the parameters are adaptively adjusted to reduce environmental interference.

Benefits of technology

It effectively reduces the interference of ambient background light, improves the accuracy and applicability of spot recognition, and is suitable for scenes such as normal light, low light and weak reflection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115131576B_ABST
    Figure CN115131576B_ABST
Patent Text Reader

Abstract

This application relates to a spot recognition method and system based on edge extraction, belonging to the technical field of image processing. It solves the problem that a complex illumination environment has a great impact on the quality of spot images and easily causes errors in identifying the center of spots. It includes: obtaining an initial image; generating a grayscale image with M rows and N columns based on the initial image; sorting the gray coefficients of each pixel grid in order of magnitude, removing a preset proportion of the maximum values and a preset proportion of the minimum values, and then calculating the average value, and setting a threshold according to the average value; regarding the pixel grids with gray coefficients greater than the threshold as spots; clustering the spot pixels to obtain the center of the spots. This application has the following effects: adaptively adjusting the parameters in the spot recognition process, reducing the interference of environmental factors on the recognition of the spot center, and realizing the recognition of the spot center under complex environmental interference through edge extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image processing, and in particular to a light spot recognition method and system based on edge extraction. Background Art

[0002] In recent years, the application of laser technology has become increasingly prosperous. The quality assessment and analysis technology of laser spots determines the application effect and has a profound impact on machine vision, weapons and equipment, optical measurement and medical equipment.

[0003] At present, the commonly used spot recognition methods only perform fitting from an algebraic or geometric perspective, which has high requirements on the quality of the spot image.

[0004] With respect to the above-mentioned related technologies, the inventors have found the following defects: with the improvement of modern people's living standards, the building materials for building living environments have become more diverse, the types of lighting fixtures have become increasingly abundant and their usage rates have continued to increase, and different groups of people have greater preferences for lighting needs, all of which have made the current lighting environment more and more complex. The complex lighting environment has a greater impact on the quality of the light spot image, which can easily cause errors in the identification of the light spot center. Summary of the invention

[0005] In order to adaptively adjust the parameters in the light spot recognition process, reduce the interference of environmental factors on the light spot center recognition, and realize the light spot center recognition under complex environmental interference through edge extraction, the present application provides a light spot recognition method and system based on edge extraction.

[0006] In a first aspect, the present application provides a light spot recognition method based on edge extraction, which adopts the following technical solution: A light spot recognition method based on edge extraction, comprising:

[0007] Get the initial image;

[0008] Generate a grayscale image with M rows and N columns based on the initial image;

[0009] Sort the grayscale coefficients of each pixel in order of size, remove the maximum value and the minimum value of the preset proportion, and then find the average value, and set the threshold value according to the average value;

[0010] The pixels whose grayscale coefficient is greater than the threshold are regarded as light spots;

[0011] Cluster the light spot pixels and find the center of the light spot.

[0012] By adopting the above technical solution, the environmental structured light image is collected, the brightness of the pixels in the background area is analyzed, and the parameters used in the light spot recognition process are adaptively adjusted according to the actual background light intensity and distribution, interference is eliminated, and the threshold of the grayscale coefficient of the light spot in the structured light image is calculated. The light spot area in the structured light image is compared and calculated, and the center of the light spot area is found, which effectively reduces the interference of the environmental background light and improves the applicability of the recognition technology.

[0013] Using edge extraction method to find a suitable threshold can effectively reduce the influence of background noise and improve the signal-to-noise ratio of the image.

[0014] Optionally, the formula for calculating the average value after removing the maximum value of the preset proportion and the minimum value of the preset proportion is as follows:

[0015]

[0016] Wherein, (M×N)AMT represents the sum of the grayscale coefficients of each grid in the M×N grid light structure map;

[0017] (M×N)MAX represents 10% of the maximum values ​​in the sort;

[0018] (M×N)MIN represents the 10% of the smallest values ​​in the sort;

[0019] M×N×80% represents the number of pixel grids remaining after removing interference items;

[0020] th represents the threshold set when identifying the light spot area.

[0021] By adopting the above technical solution, after removing the largest 10% and the smallest 10% in the sequence, the average value of the grayscale coefficients of the remaining pixels is calculated, which can avoid the influence of the two extreme values ​​on the average to the greatest extent, make the calculated average representative, and indirectly ensure the rationality of the threshold set by the average, and indirectly improve the accuracy of light spot recognition.

[0022] Optionally, clustering the spot pixels to find the spot center includes:

[0023] Use A * The background image obtained by the expansion process is expanded by selecting several non-pixel points as the starting point. * The spot pixels expanded by the algorithm are added to the list close-list, and the non-spot pixels are added to the list open-list, and the connected domain of non-spot pixels and the edge pixels of the spot are obtained;

[0024] Take several light spot pixels from the list close-list, and use the clustering method based on Euclidean distance to classify the edge pixels belonging to the same light spot into a cluster point set, thereby obtaining several cluster point sets;

[0025] Calculate the center point of each cluster point set to obtain the pixel coordinates of the light spot.

[0026] By adopting the above technical solution, the A* search algorithm is used at this time, which adopts a guiding mechanism to guide the overall search to search for the spot pixels, and through the open-list and close-list, it can speed up the acquisition of the connected domain of non-spot pixels in the background pixel map and the edge contour of the spot pixels, and then adopt the clustering method based on Euclidean distance to classify the edge pixels belonging to the same spot into a cluster point set, thereby obtaining several cluster point sets, and finally calculating the center point of each cluster point set to obtain the pixel coordinates of the spot.

[0027] Optionally, a light spot recognition method based on edge extraction further includes steps after obtaining the light spot center, which are as follows:

[0028] Obtaining a preset processing result of the light spot, wherein the preset processing result includes displaying the light spot image and position range and / or eliminating or reducing the light spot of the target image;

[0029] According to the correspondence between the preset processing result of the light spot and the processing scheme and the obtained preset processing result of the light spot, analyzing and determining the processing scheme corresponding to the preset processing result of the light spot;

[0030] Execute the treatment plan determined by the analysis.

[0031] By adopting the above technical solution, the processing result after identifying the center position of the light spot is effectively considered, and the corresponding processing solution is matched for different processing results, so as to ensure that the processing result meets the requirements.

[0032] Optionally, the method further includes steps after analyzing and determining the processing scheme corresponding to the preset processing result of the light spot and before executing the processing scheme, which are specifically as follows:

[0033] The analyzed and determined treatment plan is sent to the terminal held by the person in charge as information to be confirmed;

[0034] Analyze whether the processing solution fed back by the terminal held by the person in charge is received within the preset confirmation time;

[0035] If yes, the solution provided by the terminal held by the responsible person will be used as the solution to be executed this time;

[0036] Otherwise, the processing plan determined by analysis will be used as the processing plan to be executed this time.

[0037] By adopting the above technical solution, before executing the processing plan, the processing plan will be sent to the person in charge for confirmation to avoid the situation where the executed plan is not what the person in charge wants.

[0038] Optionally, obtaining the preset processing result of the light spot includes:

[0039] Obtain the target object and the scene of the initial image;

[0040] According to the historical processing results of the target object and the scene of the initial image, and the probability that the processing solution fed back by the terminal held by the person in charge regarding the historical processing results is different from the processing solution determined by the analysis, the probability of passing the processing result of this initial image is determined by analysis;

[0041] If the passing probability of the processing result of the initial image this time exceeds 50%, the processing result of the initial image this time is used as the preset processing result of the light spot;

[0042] On the contrary, according to the probabilities of different processing schemes fed back by the terminal held by the person in charge regarding the historical processing results and the passing probability of the processing result of this initial image, the processing scheme corresponding to the maximum probability is selected as the preset processing result of the light spot.

[0043] By adopting the above technical scheme, the influence of the target object of the initial image and the factors of the scene on the light spot processing result is fully considered to determine the historical processing result of the light spot, and the feedback processing scheme of the person in charge on the analyzed and determined processing result is also considered, so that the processing result of the initial image this time can better meet the needs of the person in charge.

[0044] Optionally, obtaining the preset confirmation time includes:

[0045] Analyze and determine the display time of the dynamic display graph of the preprocessing result according to the corresponding relationship between the preset processing result of the light spot and the display time of the dynamic display graph of the preprocessing result;

[0046] According to the correspondence between the time period and the time taken by the person in charge to respond to receiving the information through the terminal held by the person in charge, the time taken by the person in charge to respond to receiving the information through the terminal held by the person in charge is analyzed and determined;

[0047] According to the display time of the dynamic display diagram of the pre-processing result and the time it takes for the person in charge to confirm and receive the information through the terminal held by the person in charge, the preset time for the terminal held by the person in charge to feedback the processing plan is determined.

[0048] By adopting the above technical solution, full consideration is given to the need to display a dynamic display diagram of the preprocessing results in order for the person in charge to better understand the results of the preprocessing. In addition, the response time of the person in charge is taken into consideration, and the time it takes for the person in charge to respond to receiving the information through the terminal held by the person in charge is comprehensively determined, so as to more reasonably confirm the preset confirmation time, thereby avoiding the situation where the person in charge cannot confirm in time due to lack of time and the delay in the result caused by the person in charge taking too long to confirm.

[0049] Optionally, analyzing and determining the time taken by the person in charge to receive information through the terminal held by the person in charge includes:

[0050] According to the correspondence between the time period and the time the person in charge takes to receive information through the terminal he holds, query the time the person in charge takes to receive information through the terminal he holds in the current time period;

[0051] If the query is successful, the time the person in charge uses the terminal to report the time the information was received during the current period will be used as the time the person in charge uses the terminal to report the time the information was received;

[0052] On the contrary, according to the correspondence between the time lengths of the person in charge's responses to the dynamic display graph of the preprocessing results in different periods of history, the time lengths of the person in charge's responses to the dynamic display graph of the preprocessing results in history are queried;

[0053] If the frequency of the time for the historical person in charge to receive information about the dynamic display graph of the current preprocessing result is less than the preset frequency and greater than or equal to 1 time, the time period for the time for the historical person in charge to receive information about the dynamic display graph of the current preprocessing result is taken as the query object, and the time for the historical person in charge to receive information about the dynamic display graphs of the other preprocessing results in the corresponding time period is queried to obtain the time for the historical person in charge to receive information about the dynamic display graphs of the other preprocessing results in the corresponding time period, and the ratio of the time for the historical person in charge to receive information about the dynamic display graphs of the other preprocessing results to the dynamic display graph of the current preprocessing result in the corresponding time period is analyzed and obtained;

[0054] According to the time length of the person in charge of the current period responding to the dynamic display graph of the remaining preprocessing results and receiving information, and the ratio of the time length of the person in charge of the corresponding period responding to the dynamic display graph of the remaining preprocessing results and the dynamic display graph of the current preprocessing results, the time length of the person in charge responding to receiving information through the terminal held by the person in charge is analyzed and confirmed;

[0055] If the frequency of the historical person in charge's reaction to receiving information on the dynamic display graph of the current preprocessing results exceeds the preset frequency, the reaction time of receiving information in the two time periods before and after the current time period is selected, and the average is calculated as the reaction time of the person in charge through the terminal held by him.

[0056] By adopting the above technical solution, the main consideration is that the person in charge has not experienced the situation of receiving information in response to some of the preprocessing result dynamic display diagrams before. At this time, the situation of the person in charge receiving information in response to the other preprocessing result dynamic display diagrams will be combined to effectively predict the time it takes for the person in charge to receive information through the terminal held by the person in charge.

[0057] Optionally, if the preset processing result of the light spot is a position range, eliminating or reducing the light spot of the target image, analyzing and determining the processing scheme corresponding to the preset processing result of the light spot includes:

[0058] Simulate the original photo under different light sources;

[0059] The original images are converted into target images in RGB color mode, the grayscale values ​​of all pixels of the target images are calculated, and the pixel with the smallest or smaller grayscale value is selected as the target pixel of the position point among the pixels of the same position point of all the target images;

[0060] All target pixels are combined into a result image, which is a recognition image for image recognition, so as to eliminate or reduce the light spot in the target image.

[0061] By adopting the above technical solution, when the processing result of the preset light spot needs to be a position range, and the light spot of the target image needs to be eliminated or reduced, the light spot can be minimized by splicing the pixels with the smallest gray value.

[0062] In a second aspect, the present application provides a light spot recognition system based on edge extraction, which adopts the following technical solution: a light spot recognition system based on edge extraction, comprising:

[0063] The acquisition module is used to: acquire an initial image;

[0064] A generation module, used to: generate a grayscale image with M rows and N columns according to an initial image;

[0065] The threshold setting module is used to: sort the grayscale coefficient of each pixel in order of size, remove the maximum value of the preset proportion and the minimum value of the preset proportion, and then calculate the average value, and set the threshold value according to the average value;

[0066] The light spot analysis module is used to: regard the pixel grids with grayscale coefficient greater than a threshold as light spots;

[0067] The light spot center determination module is used to cluster the light spot pixels and find the light spot center.

[0068] By adopting the above technical solution, the environmental structured light image is collected through the acquisition module, the generation module, and the threshold setting module, the brightness of the pixels in the background area is analyzed, and the parameters used in the light spot recognition process are adaptively adjusted according to the actual background light intensity and distribution, interference is eliminated, and the threshold of the grayscale coefficient of the light spot in the structured light image is calculated. The light spot analysis module and the light spot center determination module are used to compare and calculate the light spot area in the structured light image and find the center of the light spot area, thereby effectively reducing the interference of the environmental background light and improving the applicability of the recognition technology.

[0069] In summary, the beneficial technical effect of the present application is as follows: when processing a grayscale image, the grayscale coefficient of each pixel is first sorted, and the average grayscale coefficient of the remaining pixels is calculated after removing the largest 10% and the smallest 10% in the sequence, so as to set the threshold th, and the pixel grids greater than the threshold th are considered as light spots, and the light spot pixels are clustered to find the center of the light spot. The algorithm can achieve effective light spot extraction in scenes such as normal lighting, weak light, and weak reflection. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 It is a method flow chart of a light spot recognition method based on edge extraction in an embodiment of the present application.

[0071] Figure 2 yes Figure 1 Step S500 of the embodiment is a schematic flow chart of a method for clustering light spot pixels to obtain the light spot center.

[0072] Figure 3 It is a schematic diagram of a method flow chart after finding the center of the light spot according to another embodiment of the present application.

[0073] Figure 4 It is a flowchart of a method according to another embodiment of the present application, which is after analyzing and determining a processing scheme corresponding to a preset processing result of a light spot and before executing the processing scheme.

[0074] Figure 5 It is a flowchart of a method for obtaining a preset processing result of a light spot according to another embodiment of the present application.

[0075] Figure 6 It is a flowchart of a method for obtaining a preset confirmation time according to another embodiment of the present application.

[0076] Figure 7 This is a flowchart of a method for analyzing and determining the time it takes a person in charge to receive information through a terminal held by another embodiment of the present application.

[0077] Figure 8It is a flowchart of a method for analyzing and determining a processing scheme corresponding to a preset processing result of a light spot if a preset processing result of the light spot is a position range, eliminating or reducing the light spot of a target image in another embodiment of the present application.

[0078] Fig. 9 It is a system block diagram of a light spot recognition system based on edge extraction in an embodiment of the present application.

[0079] In the figure, 1. acquisition module; 2. generation module; 3. threshold setting module; 4. light spot analysis module; 5. light spot center determination module. DETAILED DESCRIPTION

[0080] The present application is further described in detail below in conjunction with the accompanying drawings.

[0081] Reference Figure 1 , is a light spot recognition method based on edge extraction disclosed in this application, comprising:

[0082] Step S100, obtaining an initial image.

[0083] Among them, the initial image includes a grayscale image and a true color RGB image. The acquisition of the initial image refers to the process of imaging the object. The work of converting the analog image into a digital image can usually be completed by a scanner.

[0084] Step S200, generating a grayscale image of M rows and N columns according to the initial image.

[0085] Among them, the value range of the grayscale image matrix elements is [0, 255], so its data type is generally an 8-bit unsigned integer. When the initial image is a true color RGB image, the process of converting it to a grayscale image mainly uses grayscale processing of the image.

[0086] There are two ways to grayscale an image. The first method is to find the average value of the three components of R, G, and B for each pixel, and then assign this average value to the three components of the pixel. The second method is that in the YUV color space, the physical meaning of the Y component is the brightness of the point, and this value reflects the brightness level. According to the change relationship between the RGB and YUV color spaces, the correspondence between the brightness Y and the three color components of R, G, and B can be established: Y = 0.3R + 0.59G + 0.11B, and the grayscale value of the image is expressed by this brightness value.

[0087] Step S300, sorting the grayscale coefficients of each pixel in order of size, removing the maximum value of the preset proportion and the minimum value of the preset proportion, calculating the average value, and setting the threshold value according to the average value.

[0088] The formula for calculating the average value after removing the maximum value of the preset proportion and the minimum value of the preset proportion is as follows: Among them, (M×N) AMT Represents the sum of the grayscale coefficients of each grid in the M×N grid light structure diagram; (M×N) MAX Represents 10% of the maximum value in the sort; (M×N) MIN represents 10% of the minimum value in the sorting; M×N×80% represents the number of pixels remaining after removing interference items; th represents the threshold set when identifying the spot area.

[0089] Step S400: Pixels with grayscale coefficients greater than a threshold are regarded as light spots.

[0090] Step S500, clustering the light spot pixels to find the light spot center.

[0091] Reference Figure 2 , cluster the spot pixels and find the spot center:

[0092] Step S510, use A * The background image obtained by the expansion process is expanded by selecting several non-pixel points as the starting point. * The spot pixels expanded by the algorithm are added to the list close-list, and the non-spot pixels are added to the list open-list, so as to obtain the connected domain of non-spot pixels and the edge pixels of the spot.

[0093] Among them, the A* search algorithm is a typical heuristic search (Informed Search) algorithm. Compared with general algorithms, this algorithm uses some guiding mechanisms to guide the entire search during the search process. The A* search algorithm is applied to two lists: open-list and close-list.

[0094] The open-list is a priority queue that provides the best nodes for each search. The queue is in ascending order of the node f, which makes the A* algorithm more efficient in finding the shortest path from the start to the goal.

[0095] The close-list is a common queue that stores nodes that have been visited to avoid repeated visits to a node.

[0096] Step S520, taking several light spot pixels from the list close-list, and using a clustering method based on Euclidean distance to classify edge pixels belonging to the same light spot into a cluster point set, thereby obtaining several cluster point sets.

[0097] Step S530, calculating the center point of each cluster point set, thereby obtaining the pixel coordinates of the light spot.

[0098] exist Figure 1After step S500, after the center of the light spot is identified, it is necessary to confirm the light spot processing solution due to the different targets where the light spot is located and the application scenarios. Figure 3 The illustrated embodiment is described in detail.

[0099] Reference Figure 3 A light spot recognition method based on edge extraction also includes steps after finding the center of the light spot, which are as follows:

[0100] Step S600, obtaining a preset processing result of the light spot.

[0101] The preset processing result includes displaying the spot image and position range and / or eliminating or reducing the spot of the target image. The preset processing result of the spot can be obtained by querying from a database storing the preset processing result of the spot.

[0102] Step S700 , analyzing and determining the processing scheme corresponding to the preset processing result of the light spot according to the corresponding relationship between the preset processing result of the light spot and the processing scheme and the obtained preset processing result of the light spot.

[0103] Among them, the correspondence between the preset processing result of the light spot and the processing scheme can be queried and obtained from the data storing the correspondence between the processing result of the light spot and the processing scheme; the process of analyzing and confirming the processing scheme corresponding to the preset processing result of the light spot is as follows: taking the obtained preset processing result of the light spot as the query object, query and obtain from the data storing the correspondence between the processing result of the light spot and the processing scheme.

[0104] Step S800, executing the processing solution determined by analysis.

[0105] exist Figure 1 After step S500, after the center of the light spot is identified, it is necessary to confirm the light spot processing solution due to the different targets where the light spot is located and the application scenarios. Figure 3 The illustrated embodiment is described in detail.

[0106] exist Figure 3 Between step S300 and step S400, it is further considered that before executing the spot processing solution, the person in charge needs to confirm the solution. Figure 4 The illustrated embodiment is described in detail.

[0107] Reference Figure 4 A light spot recognition method based on edge extraction also includes steps after analyzing and determining a processing scheme corresponding to a preset processing result of the light spot and before executing the processing scheme, which are specifically as follows:

[0108] Step SA00: Send the analyzed and determined processing plan as information to be confirmed to the terminal held by the person in charge.

[0109] The method of sending to the terminal held by the person in charge may be SMS, WeChat or other methods; the terminal held by the person in charge may be a mobile phone, computer or other communication device.

[0110] Step SB00, analyzing whether the processing solution fed back by the terminal held by the person in charge is received within the preset confirmation time. If yes, then execute step SC00. Otherwise, then execute step SD00.

[0111] The preset confirmation time may be 1 minute or 2 minutes, or may be a confirmation time set by other users.

[0112] Step SC00, taking the processing solution fed back by the terminal held by the person in charge as the processing solution to be executed this time.

[0113] Step SD00, taking the processing scheme determined by analysis as the processing scheme to be executed this time.

[0114] exist Figure 3 In step S300, it is further considered that when forming the preset processing result of the light spot, it is also necessary to consider the historical adjustment of the execution plan by the person in charge. Therefore, it is necessary to make certain adjustments to the preset processing result of the light spot formed, so as to reduce the probability of the person in charge making adjustments. For details, refer to Figure 5 The illustrated embodiment is described in detail.

[0115] Reference Figure 5 , the acquisition of the preset processing results of the light spot includes:

[0116] Step S610, obtaining the target object and the scene in the initial image.

[0117] Step S620, based on the historical processing results of the target object and the scene of the initial image, and the probability that the processing solution fed back by the terminal held by the person in charge regarding the historical processing results is different from the processing solution determined by the analysis, analyze and determine the probability that the processing result of this initial image passes.

[0118] Among them, the historical processing results of the target object of the initial image and the scene can be queried and obtained from a database storing the historical processing results of the target object of the initial image and the scene, and the probability that the processing solution fed back by the terminal held by the person in charge regarding the historical processing results is different from the processing solution determined by the analysis can be queried and obtained from a database storing the probability that the processing solution fed back by the terminal held by the person in charge regarding the historical processing results is different from the processing solution determined by the analysis.

[0119] The specific processing results of the initial image can be confirmed by probability analysis as follows:

[0120] Assuming that the initial probability of the historical processing results of the target object of the initial image and the scene is 100%, then subtract the probability that the processing solution fed back by the terminal held by the person in charge regarding the historical processing results is different from the processing solution determined by the analysis. The probability obtained at this time is the passing probability of the processing result of this initial image.

[0121] Step S630: If the passing probability of the processing result of the current initial image exceeds 50%, the processing result of the current initial image is used as the preset processing result of the light spot.

[0122] Step S640: Otherwise, according to the probabilities of different processing solutions fed back by the terminal held by the person in charge regarding the historical processing results and the passing probability of the processing result of the initial image this time, the processing solution corresponding to the maximum probability is selected as the preset processing result of the light spot.

[0123] exist Figure 4 In step SB00, it is further considered that the preset confirmation time will be comprehensively confirmed based on the display of the actual pre-processing result dynamic display diagram and the response time of the person in charge in the corresponding period, rather than being fixed. Therefore, it is necessary to further analyze and judge the acquisition of the preset confirmation time. For details, refer to Figure 6 The illustrated embodiment is described in detail.

[0124] Reference Figure 6 , the acquisition of preset confirmation time includes:

[0125] Step Sa00, analyzing and determining the display time of the preprocessing result dynamic display graph according to the corresponding relationship between the preset processing result of the light spot and the display time of the preprocessing result dynamic display graph.

[0126] Among them, dynamic display pictures refer to dynamic pictures, which are pictures that produce a certain dynamic effect when a group of specific static images are switched at a specified frequency. The most common form of expression on the Internet is Gif animation, which achieves the effect of animation by switching multiple layers of pictures at different times.

[0127] The correspondence between the preset processing result of the light spot and the display time of the dynamic display graph of the preprocessing result can be obtained from a preset database that stores the correspondence between the preset processing result of the light spot and the display time of the dynamic display graph of the preprocessing result; the analysis and determination of the display time of the dynamic display graph of the preprocessing result can be carried out in the following way: taking the preset processing result of the light spot as the query object, querying and obtaining the display time of the dynamic display graph of the preprocessing result from a preset database that stores the correspondence between the preset processing result of the light spot and the display time of the dynamic display graph of the preprocessing result.

[0128] Step Sb00, analyzing and determining the time duration for the person in charge to respond to receiving information through the terminal held by the person in charge according to the corresponding relationship between the time period and the time duration for the person in charge to respond to receiving information through the terminal held by the person in charge.

[0129] Among them, the correspondence between the time period and the time it takes for the person in charge to react to receiving information through the terminal held can be queried and obtained from a preset database that stores the correspondence between the time period and the time it takes for the person in charge to react to receiving information through the terminal held; the analysis and determination process of the time it takes for the person in charge to react to receiving information through the terminal held is as follows: taking the current time period as the query object, query and obtain the time it takes for the person in charge to react to receiving information through the terminal held from a preset database that stores the correspondence between the time period and the time it takes for the person in charge to react to receiving information through the terminal held.

[0130] Step Sc00, determining the preset time for the terminal held by the person in charge to feedback the processing solution according to the display time of the dynamic display diagram of the pre-processing result and the time it takes for the person in charge to confirm the reception of information through the terminal held by the person in charge.

[0131] exist Figure 6 In step Sb00, further considering that the time length of the person in charge receiving information through the held terminal cannot be obtained from the corresponding relationship between the time period and the time length of the person in charge receiving information through the held terminal, how to effectively predict the time length of the person in charge receiving information through the held terminal, so it is necessary to further analyze and determine the time length of the person in charge receiving information through the held terminal, specifically refer to Figure 7 The illustrated embodiment is described in detail.

[0132] Reference Figure 7 , the time taken by the person in charge to receive information through the terminal held by the person in charge is analyzed and determined, including:

[0133] Step Sb10, according to the correspondence between the time period and the time period for the person in charge to receive information through the terminal held by him, query the time period for receiving information through the terminal held by him. If the query is successful, execute step Sb20. Otherwise, execute step Sb30.

[0134] Step Sb20, using the queried current time period to report the length of time the information is received through the terminal held, and the person in charge reports the length of time the information is received through the terminal held.

[0135] Step Sb30, querying the historical person in charge's reaction reception time for the current preprocessing result dynamic display graph according to the corresponding relationship between the person in charge's reaction reception time for the preprocessing result dynamic display graph in different historical periods.

[0136] Step Sb40, if the frequency of the time taken for the historical person in charge to receive information about the dynamic display graph of the current preprocessed results is less than the preset frequency and is greater than or equal to 1 time, then the time period of the time taken for the historical person in charge to receive information about the dynamic display graph of the current preprocessed results is taken as the query object, and the time taken for the historical person in charge to receive information about the dynamic display graphs of the remaining preprocessed results in the corresponding time period is queried to obtain the time taken for the historical person in charge to receive information about the dynamic display graphs of the remaining preprocessed results in the corresponding time period, and the ratio of the time taken for the historical person in charge to receive information about the dynamic display graphs of the current preprocessed results in the corresponding time period is analyzed and obtained.

[0137] The preset frequency may be 3 times or 4 times, or a number preset by the user.

[0138] Step Sb50, based on the time length of the person in charge of the current time period responding to the dynamic display diagram of the remaining preprocessing results and the ratio of the time length of the person in charge of the corresponding time period responding to the dynamic display diagram of the remaining preprocessing results and the dynamic display diagram of the current preprocessing results, analyze and confirm the time length of the person in charge responding to the information through the terminal held.

[0139] For example, assuming that the current time period is 13 o'clock, and assuming that the dynamic display graph of the previous preprocessing result is A, then the time period of the historical person in charge regarding A is 11 o'clock, the time it takes for the historical person in charge to receive information about A is 2 minutes, and the time it takes for the person in charge to receive information about the dynamic display graph B at 11 o'clock is 90 seconds. Then, it can be analyzed and determined that the ratio of the time it takes for the historical person in charge to receive information about the dynamic display graphs of the remaining preprocessing results and the dynamic display graph of the current preprocessing results in the corresponding time period is 3:4.

[0140] Assuming that the time it takes for the person in charge to respond to and receive information about the dynamic display diagram B at 13:00 is 60 seconds, then the time it takes for the person in charge to respond to and receive information through the terminal held by the person in charge is 80 seconds.

[0141] Step Sb60, if the frequency of the historical person in charge's reaction to the dynamic display of the current preprocessing result exceeds the preset frequency, select the reaction time of the two time periods before and after the current time period, and calculate the average as the reaction time of the person in charge through the terminal held by the person in charge.

[0142] Assuming that the response and reception time of the two time periods before and after the current time period are 80 seconds and 60 seconds respectively, then the response and reception time of the person in charge through the terminal held is 70 seconds.

[0143] exist Figure 3 In step S700, it is further considered that when the preset processing result of the light spot is a position range, the light spot of the target image is eliminated or reduced, the specific processing scheme is how, so it is necessary to further analyze and determine the processing scheme corresponding to the preset processing result of the light spot, specifically referring to Figure 8 The illustrated embodiment is described in detail.

[0144] Reference Figure 8 If the preset processing result of the light spot is a position range, eliminating or reducing the light spot of the target image, the processing scheme corresponding to the preset processing result of the light spot is analyzed and determined, including:

[0145] Step S7a0, simulating original images under different light sources.

[0146] Step S7b0, converting the original images into target images in RGB color mode, calculating the grayscale values ​​of all pixels of all target images, and selecting the pixel with the smallest or smaller grayscale value among the pixels at the same position of all target images as the target pixel at that position.

[0147] Step S7c0, all target pixels are combined into a result image, and the result image is a recognition image for image recognition, so as to eliminate or reduce the light spot in the target image.

[0148] Among them, since the result image is composed of the target pixel points with the smallest or smaller grayscale values ​​in all the target images, there is no or very small light spot in the result image, thereby achieving the purpose of eliminating or reducing the light spot in the target image and improving the accuracy of image recognition.

[0149] Reference Fig. 9 , the present application also provides a spot recognition system based on edge extraction, comprising:

[0150] The acquisition module 1 is used to: acquire an initial image;

[0151] Generating module 2, used for: generating a grayscale image with M rows and N columns according to the initial image;

[0152] The threshold setting module 3 is used to: sort the grayscale coefficient of each pixel in order of size, remove the maximum value of the preset proportion and the minimum value of the preset proportion, and then calculate the average value, and set the threshold according to the average value;

[0153] The light spot analysis module 4 is used to: regard the pixel grids whose grayscale coefficient is greater than the threshold as light spots;

[0154] The light spot center determination module 5 is used to cluster the light spot pixels and find the light spot center.

[0155] The embodiments of this specific implementation method are all preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Therefore, all equivalent changes made based on the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A spot recognition method based on edge extraction, characterized in that , it includes: Obtain the initial image; Generate a grayscale image with M rows and N columns according to the initial image; Sort the grayscale coefficients of each pixel in order of magnitude, remove the maximum value of the preset proportion and the minimum value of the preset proportion, and then calculate the average value, and set the threshold according to the average value; Regard the pixel grid with a grayscale coefficient greater than the threshold as a spot; Cluster the spot pixels to find the center of the spot; The formula for calculating the average value after removing the maximum value of the preset proportion and the minimum value of the preset proportion is as follows: Among them, (M×N) AMT represents the sum of the gray scale coefficients of each cell in the optical structure diagram of M×N cells; (M×N) MAX represents 10% of the maximum value in the sorting; (M×N) MIN represents 10% of the minimum value in the sorting; M×N×80% represents the number of remaining pixel grids after removing the interference items; th represents the threshold set when recognizing the spot area; Clustering the spot pixels to find the center of the spot includes: Use A * The background image obtained by the expansion process, select several non-pixel points as starting points for expansion, and add the spot pixels expanded by the A * algorithm to the list close-list, and the non-spot pixels to the list open-list, to obtain the connected domain of non-spot pixels and the edge pixel points of the spot; Take several spot pixels from the list close-list, and use the clustering method based on the Euclidean distance to classify the edge pixel points belonging to the same spot into a clustering point set, so as to obtain several clustering point sets; Calculate the center point of each clustering point set to obtain the pixel coordinates of the spot.

2. The spot recognition method based on edge extraction according to claim 1, characterized in that it further includes steps after finding the center of the spot, specifically as follows: Obtain the preset processing result of the spot, where the preset processing result includes displaying the spot image and the position range and / or eliminating or reducing the spot of the target image; According to the corresponding relationship between the preset processing result of the spot and the processing scheme, and the obtained preset processing result of the spot, analyze and determine the processing scheme corresponding to the preset processing result of the spot; Execute the analyzed and determined processing scheme.

3. The spot recognition method based on edge extraction according to claim 2, characterized in that it further includes steps after analyzing and determining the processing scheme corresponding to the preset processing result of the spot and before executing the processing scheme, specifically as follows: Send the analyzed and determined processing scheme as the information to be confirmed to the terminal held by the person in charge; Analyze whether the processing scheme feedback by the terminal held by the person in charge is received within the preset confirmation time; If so, use the processing scheme feedback by the terminal held by the person in charge as the processing scheme to be executed this time; Otherwise, use the analyzed and determined processing scheme as the processing scheme to be executed this time.

4. The spot recognition method based on edge extraction according to claim 3, characterized in that The acquisition of the preset processing result of the spot includes: Obtain the target object and the scene of the initial image; According to the historical processing result of the target object and the scene of the initial image, and the probability that the processing scheme feedback by the terminal held by the person in charge for the historical processing result is different from the analyzed and determined processing scheme, analyze and determine the passing probability of the processing result of the current initial image; If the passing probability of the processing result of the current initial image exceeds 50%, use the processing result of the current initial image as the preset processing result of the spot; Otherwise, according to the probability of different processing schemes feedback by the terminal held by the person in charge for the historical processing result and the passing probability of the processing result of the current initial image, select the processing scheme corresponding to the maximum probability as the preset processing result of the spot.

5. A spot recognition method based on edge extraction according to claim 3 or 4, characterized in that, the acquisition of the preset confirmation time includes: Analyzing and determining the display time of the dynamic display diagram of the preprocessing result according to the corresponding relationship between the preset processing result of the spot and the display time of the dynamic display diagram of the preprocessing result; Analyzing and determining the information reception time of the person in charge through the terminal held according to the corresponding relationship between the time period and the information reception time of the person in charge through the terminal held; Determining the preset time for the terminal held by the person in charge to feedback the processing scheme according to the display time of the dynamic display diagram of the preprocessing result and the information reception time of the person in charge through the terminal held.

6. A spot recognition method based on edge extraction according to claim 5, characterized in that, Analyzing and determining the information reception time of the person in charge through the terminal held includes: Querying the information reception time of the current time period through the terminal held by the person in charge according to the corresponding relationship between the time period and the information reception time of the person in charge through the terminal held; If it is queried, the information reception time of the current time period through the terminal held by the person in charge is used as the information reception time of the person in charge through the terminal held; Otherwise, according to the corresponding relationship between the information reception time of the historical person in charge about the dynamic display diagram of the preprocessing result in different time periods, query the information reception time of the historical person in charge about the dynamic display diagram of the current preprocessing result; if the frequency of the information reception time of the historical person in charge about the dynamic display diagram of the current preprocessing result is less than the preset frequency and greater than or equal to 1 time, the time period of the information reception time of the historical person in charge about the dynamic display diagram of the current preprocessing result is used as the query object, query and obtain the information reception time of the historical person in charge about the dynamic display diagram of the remaining preprocessing results in the corresponding time period, and analyze and obtain the ratio of the information reception time of the historical person in charge about the dynamic display diagram of the remaining preprocessing results and the dynamic display diagram of the current preprocessing result in the corresponding time period; Analyzing and confirming the information reception time of the person in charge through the terminal held according to the information reception time of the historical person in charge about the dynamic display diagram of the remaining preprocessing results in the current time period and the ratio of the information reception time of the historical person in charge about the dynamic display diagram of the remaining preprocessing results and the dynamic display diagram of the current preprocessing result in the corresponding time period; If the frequency of the information reception time of the historical person in charge about the dynamic display diagram of the current preprocessing result exceeds the preset frequency, select the information reception times of the two time periods before and after the current time period that are closest to the current time period, and calculate the average value as the information reception time of the person in charge through the terminal held.

7. A spot recognition method based on edge extraction according to claim 2, characterized in that, If the preset processing result of the spot is to position the range, eliminate or reduce the spot of the target image, analyzing and determining the processing scheme corresponding to the preset processing result of the spot includes: Simulating the original image of the image under different light sources; Convert the original images into target images in the RGB color mode, calculate the grayscale values of all pixel points of all target images, and select the pixel point with the smallest or relatively small grayscale value among the pixel points at the same position of all target images as the target pixel point at that position; Combine all target pixel points into a result image, and the result image is the recognition image for image recognition, so as to eliminate or reduce the light spot in the target image.

8. A light spot recognition system based on edge extraction Characterized in that It executes a light spot recognition method based on edge extraction as described in claim 1, including: An acquisition module (1) for acquiring an initial image; A generation module (2) for generating a grayscale image with M rows and N columns according to the initial image; A threshold setting module (3) for sorting the grayscale coefficients of each pixel in order of magnitude, removing the maximum value of a preset proportion and the minimum value of a preset proportion, and then calculating the average value, and setting the threshold according to the average value; A light spot analysis module (4) for regarding the pixel grid with a grayscale coefficient greater than the threshold as a light spot; A light spot center determination module (5) for clustering the light spot pixels and calculating the light spot center.

Citation Information

Patent Citations

  • Method and system for extracting touch light spots based on camera positioning

    CN102880355A

  • Pupil positioning method and equipment

    CN105678286A