Image processing method, device and equipment

The video of the hard disk LED lights is collected through the camera, and the flashing frequency of the LED lights is calculated using the image processing method, which solves the problems of long test time, large workload and prone to result deviations in the prior art, and realizes automated testing and improves testing efficiency.

CN119545157APending Publication Date: 2025-02-28LCFC HEFEI ELECTRONICS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411495890.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

When performing hard disk testing on a hot-swap backplane, you need to manually observe the status of the indicator light, resulting in a long test time, a large workload, and prone to deviations in the test results.

Method used

The video of LED lights is collected by the camera, the color parameters in the video frame are extracted using the image processing method, the color distribution data of the preset time period is determined, and the flashing frequency of the LED light is calculated by comparing the color distribution data of the two consecutive video frames.

Benefits of technology

The workload of manual observation and recording is reduced, testing efficiency is improved, test results are avoided, and test results are deviated, and eye fatigue is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119545157A_ABST
    Figure CN119545157A_ABST
Patent Text Reader

Abstract

The invention provides an image processing method, device and equipment, and the method comprises the steps: obtaining an initial video of a target object after a target object is recognized, and obtaining a video frame image after the initial video is processed; cutting the video frame picture to obtain a target image of the position of the target object; extracting color parameters in the target image, and determining color distribution data of the video frame picture in the preset time period based on the color parameters; and extracting the color distribution data of two continuous video frame pictures in the video frame pictures in the preset time period for comparison, and determining the flicker frequency of the target object. According to the invention, the flicker frequency of the LED lamp can be analyzed by collecting the video of the LED lamp, so that the manual workload can be reduced, and the deviation of the test result can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to an image processing method, device and equipment. Background Art

[0002] The Hot-Swap Backplane (HSBP) usually has multiple hard disks connected to it, and each hard disk needs to check the status of the indicator light (LED), which takes a lot of testing time. During the test, the tester needs to observe the status of the flashing light and collect test data, which increases the heavy and complicated workload of the tester. Repeated testing for a long time is prone to test result deviation, resulting in test errors or omissions. Summary of the invention

[0003] The present disclosure provides an image processing method, device and equipment to at least solve the above technical problems existing in the prior art.

[0004] According to a first aspect of the present disclosure, there is provided an image processing method, the method comprising:

[0005] After identifying the target object, obtaining an initial video of the target object;

[0006] After processing the initial video, a video frame is obtained, and the video frame is cropped to obtain a target image at a location where a target object is located;

[0007] Extracting color parameters from the target image, and determining color distribution data of video frames in a preset time period based on the color parameters;

[0008] The color distribution data of two consecutive video frames in the preset time period are extracted and compared to determine the flickering frequency of the target object.

[0009] In one possible implementation manner, after identifying the target object, obtaining an initial video of the target object includes at least one of the following:

[0010] Identify an edge frame area of ​​the indicator light within the framing range of the first camera, and obtain a video of the edge frame area that meets the first size as an initial video;

[0011] A rectangular frame area within the viewing range of the second camera is identified, and a video of the rectangular frame area that matches the second size is used as an initial video of the writing board.

[0012] In one possible implementation manner, the processing of the initial video to obtain a video frame includes:

[0013] Two adjacent video frame images in the initial video are processed into one video frame picture.

[0014] In one possible implementation manner, extracting the color parameters in the target image includes:

[0015] Mapping the target image to a three-dimensional space to obtain a three-dimensional space map;

[0016] A color cluster is extracted from the three-dimensional space image, and the color cluster is used as a color parameter of a target image.

[0017] In one possible implementation manner, determining the color distribution data of the video frame in a preset time period based on the color parameter includes:

[0018] The target object in the video frame picture of the preset time period is assigned a value based on the color parameter to obtain the color distribution data of the video frame picture of the preset time period.

[0019] In one possible implementation, assigning a value to a target object in a video frame of a preset time period based on the color parameter includes:

[0020] Performing color recognition on the color clusters in the three-dimensional space diagram to determine the color of the indicator light; wherein the first color of the indicator light indicates that the indicator light is in a lit state, and the second color of the indicator light indicates that the indicator light is in an off state;

[0021] The color of the indicator light being on is set to the first value, and the color of the indicator light being off is set to the second value.

[0022] In one possible implementation manner, extracting and comparing color distribution data of two consecutive video frames in the video frame images of the preset time period includes:

[0023] Obtain color distribution data of two consecutive video frames;

[0024] Based on the color distribution data of two consecutive video frames, the color difference value of the two consecutive video frames is determined. If the difference value is lower than a preset threshold, the color distribution data of the two consecutive video frames is saved. If the difference value is not lower than the preset threshold, the color distribution data of the two consecutive video frames is saved.

[0025] In one possible implementation manner, determining the flickering frequency of the target object includes:

[0026] The frequency calculation is performed based on the saved color distribution data to obtain the flickering frequency of the target object.

[0027] According to a second aspect of the present disclosure, there is provided an image processing device, the device comprising:

[0028] An acquisition module, used to acquire an initial video of the target object after identifying the target object;

[0029] A positioning module, used to obtain a video frame after processing the initial video, and to crop the video frame to obtain a target image at the location of the target object;

[0030] An extraction module, used to extract color parameters in the target image, and determine color distribution data of a video frame in a preset time period based on the color parameters;

[0031] The analysis module is used to extract the color distribution data of two consecutive video frames in the preset time period for comparison to determine the flickering frequency of the target object.

[0032] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0033] at least one processor; and

[0034] a memory communicatively connected to the at least one processor; wherein,

[0035] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present disclosure.

[0036] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method described in the present disclosure.

[0037] The image processing method, device and equipment disclosed in the present invention, after identifying the target object, obtains the initial video of the target object, processes the initial video to obtain a video frame, crops the video frame, and obtains the target image at the location of the target object; extracts the color parameters in the target image, and determines the color distribution data of the video frame in a preset time period based on the color parameters; extracts the color distribution data of two consecutive video frames in the video frame in the preset time period for comparison, and determines the flickering frequency of the target object. The present application can analyze the flickering frequency of LED lights by collecting videos of LED lights, which can not only reduce the manual workload, but also avoid deviations in test results.

[0038] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:

[0040] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0041] Figure 1 A schematic diagram of the implementation process of the image processing method according to the embodiment of the present disclosure is shown;

[0042] Figure 2 A scatter plot provided by an embodiment of the present disclosure is shown;

[0043] Figure 3 A schematic diagram showing the structure of an image processing device according to an embodiment of the present disclosure is shown;

[0044] Figure 4 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0045] In order to make the purpose, features, and advantages of the present disclosure more obvious and easy to understand, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0046] The LED light flicker test for different types of HSBP and hard disks from different manufacturers takes up a lot of test time and heavy repetitive work. During the test, the tester needs to observe the status of the flickering light and collect test data, which greatly increases the heavy and complicated workload of the tester. Repeated tests for a long time are prone to test result deviations. In addition, long-term observation of LED light flickering will cause fatigue and illusion to the tester's eyes, which is easy to cause test errors or omissions. And the human eye cannot accurately determine the frequency of the flickering light, which is easy to cause quality problems.

[0047] The image processing method, device and equipment provided by the present application are described below in conjunction with the accompanying drawings.

[0048] like Figure 1 As shown, the present application provides an image processing method, the method comprising:

[0049] S101, after identifying a target object, obtaining an initial video of the target object;

[0050] It can be understood that the target object in the present application is the LED light on the hard disk. In the present application, the camera can be aimed at the LED light on the hard disk to shoot and obtain the initial video of the LED light.

[0051] S102, processing the initial video to obtain a video frame, and cropping the video frame to obtain a target image at a location where a target object is located;

[0052] Specifically, in the present application, the video frame images in the initial video are preprocessed to obtain the video frame images. It is understandable that in the present application, the camera can be connected to the computer, so that the camera starts to work to capture the video of the flashing LED light and can be directly transmitted to the computer. When the camera is shooting, the edge frame of the flashing LED light can be identified by the target detection model, so as to locate the edge frame of the LED light and obtain the initial video.

[0053] In this application, the obtained video frame is cropped to obtain an image of the position of the LED flashing light. It can be understood that the position of the LED flashing light is located in this application in order to extract the color in the target image more accurately later.

[0054] S103, extracting color parameters from the target image, and determining color distribution data of video frames in a preset time period based on the color parameters;

[0055] It can be understood that in the present application, the target image can be first converted into a three-dimensional space graph, and then the color clusters of the three-dimensional space graph can be extracted through the color clustering extraction algorithm model, and then the colors are assigned to obtain color distribution data. It can be understood that in the present application, by assigning values ​​to the colors in the color clusters, the color distribution data of the video frame in the preset time period can be obtained.

[0056] S104, extracting color distribution data of two consecutive video frames in the preset time period for comparison to determine the flickering frequency of the target object.

[0057] Extract the color distribution data of two consecutive video frames in the preset time period for comparison, and determine the color difference value of the two consecutive video frames. It can be understood that the color difference indicates that the indicator light is flashing, otherwise it indicates that the indicator light is not flashing. If the indicator light is not flashing, save the color distribution data of the previous video frame in the two consecutive video frames. If the indicator light is flashing, save the color distribution data of the two consecutive video frames. Finally, calculate the flashing frequency based on the retained data.

[0058] The present application provides an image processing method. After identifying a target object, the present application obtains an initial video of the target object, processes the initial video to obtain a video frame, crops the video frame to obtain a target image at the location of the target object, extracts color parameters in the target image, and determines color distribution data of the video frame in a preset time period based on the color parameters, extracts color distribution data of two consecutive video frames in the video frame in the preset time period for comparison, and determines the flickering frequency of the target object. The present application can analyze the flickering frequency of LED lights by collecting videos of LED lights, which can not only reduce manual workload, but also avoid deviation in test results.

[0059] In some embodiments, after identifying the target object, obtaining an initial video of the target object includes at least one of the following:

[0060] Identify an edge frame area of ​​the indicator light within the framing range of the first camera, and obtain a video of the edge frame area that meets the first size as an initial video;

[0061] A rectangular frame area within the viewing range of the second camera is identified, and a video of the rectangular frame area that matches the second size is used as an initial video of the writing board.

[0062] It is understandable that in this application, the camera can be connected to a computer, the camera identifies the edge frame area of ​​the LED light within the framing range, and intercepts the edge frame area with a first size to obtain an initial video. It is understandable that the first size is larger than the edge frame of the LED light, thereby ensuring that the LED light is captured.

[0063] Alternatively, the present application identifies a rectangular frame area within the field of view of the second camera, where the rectangular frame area is the edge frame area of ​​the LED light.

[0064] It should be noted that the target object can be identified in the present application by using a target detection model. It is understandable that the target detection model can be set in a camera or a computer. After the camera acquires an image or video, the target detection model identifies the target object in the image or video. The target detection model used in the present application can learn the feature representation of the target by training on large-scale annotated data, thereby achieving accurate target detection.

[0065] The target detection model used in this application contains 24 convolutional layers and 2 fully connected layers; the first 20 convolutional layers are used for pre-training, the following 4 are randomly initialized convolutional layers, and 2 fully connected layers. The target detection model first divides the video frame image obtained by the camera into a 7×7 grid, each grid can detect whether it contains a target object. The target detection model in this application can also perform grayscale processing, noise edge processing and edge processing on the real video image, so as to make the recognition result more accurate. The target detection model in this application can also detect different target objects, which is not limited in this application.

[0066] In some embodiments, the processing of the initial video to obtain a video frame includes:

[0067] Two adjacent video frame images in the initial video are processed into one video frame picture.

[0068] Specifically, the present application processes the positioning LED light flashing video into a video frame screen with 2 frames as one frame. It should be noted that the reason why the present application uses 2 frames as one frame screen is because all video frames are 2 frames as one frame screen, although 1 frame can also be one frame as one frame screen. However, when shooting a video, there may be bad frames, and then no frame screen can be formed. Therefore, a minimum of 2 frames are selected as a video frame screen to avoid losses caused by bad frame images.

[0069] In some embodiments, extracting the color parameters in the target image includes:

[0070] Mapping the target image to a three-dimensional space to obtain a three-dimensional space map;

[0071] A color cluster is extracted from the three-dimensional space image, and the color cluster is used as a color parameter of a target image.

[0072] Specifically, the present application first maps the target image to a three-dimensional space to obtain a three-dimensional space graph, and then extracts the color clusters in the three-dimensional space graph through a color clustering extraction algorithm model. The color clustering extraction algorithm model in the present application is pre-built. The color clustering extraction algorithm is a clustering algorithm for K clusters of a data set. It is called K-means because it can find K different clusters, and the center of each cluster is calculated using the mean of the values ​​contained in the cluster. The number of clusters K is specified by the user, and each cluster is described by its centroid, that is, the center of all the points in the cluster. Specifically, data with similar features in a large and complex data set are automatically classified together, called a cluster. The more similar the objects in the cluster, the better the clustering effect. For example, LED lights flash (the light color has data features such as gray and amber orange or the shape of the light), and the clustering method is used to automatically divide it into multiple categories according to the features, and then define the clustering result (i.e. cluster recognition (gray and white clusters, amber orange clusters, light shape clusters, etc.)). For example, the flashing color of an LED light is divided into two clusters (classes), and then by analyzing the characteristics of these two types of LED lights, each cluster is given a name, such as the gray-white cluster and the amber-orange-red cluster, thus completing the clustering. Finally, the application can also evaluate the quality of the model through the sum of squared errors (SSE). The smaller the SSE value, the closer to their centroid, and the better the clustering effect. Since the error is squared, more attention is paid to those points far from the center, which are generally boundary points or outliers.

[0073] Specifically, the color clustering extraction algorithm model used in this application to extract the color cluster of the LED image is to cluster all the yellow lights and white lights in a video frame. K initial points are randomly determined as the centroid (not necessarily the points in the data). Each point in the data set is then assigned to a cluster. Specifically, the nearest centroid is found for each point, and the cluster corresponding to the centroid is assigned to it. The centroid of each cluster is then updated to the average value of all the points in the cluster. The above process is repeated until all points in the data set are closest to their corresponding centroids.

[0074] In some embodiments, determining the color distribution data of the video frame in a preset time period based on the color parameter includes:

[0075] The target object in the video frame picture of the preset time period is assigned a value based on the color parameter to obtain the color distribution data of the video frame picture of the preset time period.

[0076] As an embodiment, assigning a value to a target object in a video frame of a preset time period based on the color parameter includes:

[0077] Performing color recognition on the color clusters in the three-dimensional space diagram to determine the color of the indicator light; wherein the first color of the indicator light indicates that the indicator light is in a lit state, and the second color of the indicator light indicates that the indicator light is in an off state;

[0078] The color of the indicator light being on is set to the first value, and the color of the indicator light being off is set to the second value.

[0079] In this application, each color in the video frame is identified by a color recognition model, and the color clustering extraction algorithm model is used to extract the color clusters of the video frame picture for color model recognition and the color distribution data statistics of the video frame pictures in the first 4 seconds of the video are obtained as follows: Figure 2 The scatter plot shown. This application predefines: prepare the hard disk LED flashing light, the color when the light is on (amber orange red) and the color when the light is off (gray white) for color model training, define the LED flashing light, the light color when the light is on is 1, that is, amber orange red, and the light color when the light is off is 0, that is, gray white.

[0080] Among them, the color recognition model is pre-trained, such as Figure 2 As shown, training data is prepared in this application, and the training data includes 20 pictures of the color of the hard disk LED light flashing, when the light is on, and 20 pictures of the color of the picture when it is not on. Then the color of the picture when the hard disk flashes and the light is on (amber orange-yellow) is marked as 1, and the color of the picture when the light is not on (grayish white) is marked as 0. Next, a simple CNN model is established. The CNN model includes two convolutional layers and a pooling layer, as well as a fully connected layer. The CNN model uses the Adam optimizer, binary cross entropy as the loss function, and accuracy as the evaluation indicator. Then, the prepared training data is input into the CNN model for training, the number of training rounds is 10, and the batch size of each training is 8. Finally, the trained CNN model, that is, the color recognition model, is used for prediction, and the one-dimensional data of the color, that is, the color distribution data, is output.

[0081] The CNN model provided in this application includes two convolutional layers (Conv2D) and a pooling layer (MaxPooling2D), as well as a fully connected layer (Dense). The convolutional layer extracts image color features by convolution operation on the input image color using a filter (convolution kernel). The pooling layer is used to reduce the spatial dimension of the feature map and reduce the demand for computing resources. The fully connected layer flattens the feature map output by the pooling layer and classifies it through the neurons of the fully connected layer. The color recognition model uses the ReLU activation function to introduce nonlinearity and increase the expressive power of the model. The last layer uses the Sigmoid activation function to convert the output into a one-dimensional data probability value of the color. In the training stage, the color recognition model minimizes the loss function (binary_crossentropy) and improves the accuracy by back-propagating and optimizing the training data. The training of the color recognition model uses the Adam optimizer to minimize the binary cross entropy loss function, and evaluates the performance of the model based on the accuracy) In the prediction stage, the color recognition model calculates the color of the input test image through forward propagation to obtain a one-dimensional data probability value of a color.

[0082] Specifically, the color recognition process of the color recognition model is:

[0083] (I) Convolution operation:

[0084] The input color image size is Width×Height×Channels.

[0085] The convolution kernel size is KernelWidth×KernelHeight×KernelChannels.

[0086] The convolution stride is StrideWidth×StrideHeight.

[0087] The convolution result can be obtained by multiplying each input color image area by the convolution kernel element by element and then summing them.

[0088] In this process, convolution is performed on each channel of the input at the same time to obtain an output result equal to the number of channels.

[0089] (ii) Activation function:

[0090] Commonly used activation functions include ReLU (Rectified Linear Unit), Sigmoid and Tanh.

[0091] An activation function is applied after the output of each convolutional layer and fully connected layer to introduce nonlinear relationships and enhance the expressiveness of the model.

[0092] (III) Pooling operation:

[0093] Max pooling is a common pooling operation, which is usually used to reduce the size of feature maps.

[0094] The maximum value in the pooling window is retained and the remaining values ​​are ignored to form a downsampled feature map.

[0095] (IV) Fully connected layer:

[0096] A fully connected layer connects all neurons in the previous layer to every neuron in the current layer.

[0097] Each connection has an adjustable weight, which is learned during the training process.

[0098] In some embodiments, extracting and comparing color distribution data of two consecutive video frames in the preset time period includes:

[0099] Obtain color distribution data of two consecutive video frames;

[0100] Based on the color distribution data of two consecutive video frames, the color difference value of the two consecutive video frames is determined. If the difference value is lower than a preset threshold, the color distribution data of the previous video frame in the two consecutive video frames is saved. If the difference value is not lower than the preset threshold, the color distribution data of the two consecutive video frames is saved.

[0101] As an implementation manner, determining the flickering frequency of the target object includes:

[0102] The frequency calculation is performed based on the saved color distribution data to obtain the flickering frequency of the target object.

[0103] It should be noted that in this application, the colors of two consecutive video frames are compared. If the color difference value of the two consecutive video frames is lower than a preset threshold, the color distribution data of the previous video frame in the two consecutive video frames is saved, and if the color difference of the two consecutive video frames is very large and not lower than the preset threshold, the color distribution data of the two video frames are saved.

[0104] The reason why the color distribution data of two consecutive video frames is compared in this application, and the colors of the two video frames are taken if the colors are very different, is because it is assumed that there will be two consecutive LED flashing lights in 150 pictures, and the light is on and off, which are captured continuously. The two consecutive video frames of the light on and off indicate that a flashing action has been performed. Therefore, if the color distribution data of two consecutive video frames are compared, and the colors of the two consecutive video frames are very different, the colors of the two video frames are taken as data.

[0105] Specifically, the frequency calculation method based on the comparison data is as follows: Assume that a video has a frame rate of 30fps and a duration of 10 seconds. If 2 frames are used as a video frame, there are 15 frames in one second (30*1=30; 30 / 2=15). After the above operation, there are 8 frames left in one second. This is why the 30 on the X-axis of the figure below is a time period (30 on the X-axis represents the 1st second, 60 represents the 2nd second, and so on). Among these 8 frames, 4 are when the LED light is on and 4 are not on. In other words, the LED light flashes 4 times in one second (the color represents 10101010). And in this 10-second video, the LED light flashes 4 times every second. The flashing frequency is 4HZ. Through actual comparison, it can be seen that the hard disk LED light specification is confirmed to be consistent.

[0106] The image processing method provided in the present application processes and analyzes the collected test data to determine whether the flashing color of the LED light is correct and the flashing frequency of the LED light within a cycle, thereby replacing the tester's eyes to make judgments and analyses, greatly reducing false measurements caused by humans.

[0107] like Figure 3 As shown, an embodiment of the present application provides an image processing device, the device comprising:

[0108] The acquisition module 301 is used to acquire an initial video of the target object after identifying the target object;

[0109] A positioning module 302 is used to obtain a video frame after processing the initial video, and to crop the video frame to obtain a target image at the location of the target object;

[0110] An extraction module 303 is used to extract color parameters in the target image and determine color distribution data of a video frame in a preset time period based on the color parameters;

[0111] The analysis module 304 is used to extract the color distribution data of two consecutive video frames in the preset time period for comparison to determine the flicker frequency of the target object.

[0112] The image processing device provided by the present application comprises an acquisition module 301 which acquires an initial video of the target object after identifying the target object, a positioning module 302 which processes the initial video to obtain a video frame, crops the video frame, and obtains a target image at the location of the target object; an extraction module 303 extracts color parameters in the target image, and determines color distribution data of the video frame in a preset time period based on the color parameters; and an analysis module 304 extracts color distribution data of two consecutive video frames in the video frame in the preset time period for comparison, and determines the flickering frequency of the target object.

[0113] It should be noted that the image processing device of the embodiment of the present application solves the problem in a similar principle to the aforementioned image processing method. Therefore, the implementation process, implementation principle and beneficial effects of the image processing device can all be referred to the description of the implementation process, implementation principle and beneficial effects of the aforementioned method, and the repeated parts will not be repeated.

[0114] An embodiment of the present application provides an electronic device, including:

[0115] at least one processor; and

[0116] a memory communicatively connected to the at least one processor; wherein,

[0117] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any one of the above embodiments.

[0118] An embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in any of the above embodiments.

[0119] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.

[0120] Figure 4 A schematic block diagram of an example electronic device 400 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0121] like Figure 4 As shown, the device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0122] A number of components in the device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0123] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above, such as image processing methods. For example, in some embodiments, the image processing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of the image processing method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the image processing method in any other appropriate manner (e.g., by means of firmware).

[0124] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0125] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0126] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0127] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0128] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0129] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0130] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0131] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0132] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. An image processing method, characterized in that: The method comprises: After identifying the target object, obtaining an initial video of the target object; After processing the initial video, a video frame is obtained, and the video frame is cropped to obtain a target image at a location where a target object is located; Extracting color parameters from the target image, and determining color distribution data of video frames in a preset time period based on the color parameters; The color distribution data of two consecutive video frames in the preset time period are extracted and compared to determine the flickering frequency of the target object.

2. The method according to claim 1, characterized in that After the target object is identified, obtaining an initial video of the target object includes at least one of the following: Identify an edge frame area of ​​the indicator light within the framing range of the first camera, and obtain a video of the edge frame area that meets the first size as an initial video; A rectangular frame area within the viewing range of the second camera is identified, and a video of the rectangular frame area that matches the second size is used as an initial video of the writing board.

3. The method according to claim 1, characterized in that The step of obtaining a video frame after processing the initial video includes: Two adjacent video frame images in the initial video are processed into one video frame picture.

4. The method according to claim 1, characterized in that: The step of extracting color parameters from the target image comprises: Mapping the target image to a three-dimensional space to obtain a three-dimensional space map; A color cluster is extracted from the three-dimensional space image, and the color cluster is used as a color parameter of a target image.

5. The method according to claim 4, characterized in that The step of determining color distribution data of a video frame in a preset time period based on the color parameter includes: The target object in the video frame picture of the preset time period is assigned a value based on the color parameter to obtain the color distribution data of the video frame picture of the preset time period.

6. The method according to claim 5, characterized in that The assigning of values ​​to the target objects in the video frames of the preset time period based on the color parameters includes: Performing color recognition on the color clusters in the three-dimensional space diagram to determine the color of the indicator light; wherein the first color of the indicator light indicates that the indicator light is in a lit state, and the second color of the indicator light indicates that the indicator light is in an off state; The color of the indicator light being on is set to the first value, and the color of the indicator light being off is set to the second value.

7. The method according to claim 5, characterized in that The extracting and comparing the color distribution data of two consecutive video frames in the video frame of the preset time period includes: Obtain color distribution data of two consecutive video frames; Based on the color distribution data of two consecutive video frames, the color difference value of the two consecutive video frames is determined. If the difference value is lower than a preset threshold, the color distribution data of the previous video frame in the two consecutive video frames is saved. If the difference value is not lower than the preset threshold, the color distribution data of the two consecutive video frames is saved.

8. The method according to claim 1, characterized in that Determining the flickering frequency of the target object includes: The frequency calculation is performed based on the saved color distribution data to obtain the flickering frequency of the target object.

9. An image processing device, characterized in that: The device comprises: An acquisition module, used to acquire an initial video of the target object after identifying the target object; A positioning module, used to obtain a video frame after processing the initial video, and to crop the video frame to obtain a target image at the location of the target object; An extraction module, used to extract color parameters in the target image, and determine color distribution data of a video frame in a preset time period based on the color parameters; The analysis module is used to extract the color distribution data of two consecutive video frames in the preset time period for comparison to determine the flickering frequency of the target object.

10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.