Image processing method based on embedded system
By using PC models to analyze and process images in an embedded system, the problem of lack of feature images in the prior art is solved, and high accuracy recognition of different images is achieved.
Patent Information
- Application Number
- CN202210542386.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-17
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2042-05-17
AI Technical Summary
The existing image recognition methods rely on the color and/or contour features in the image, and cannot accurately identify images lacking these features, resulting in limitations and inaccuracies of the application of recognition.
Using an image processing method based on an embedded system, an embedded computer instructs the camera to collect images and perform pre-processing, and using a PC model to analyze and process the image, identify the image content, and integrate the image into different types of image collections to realize the recognition of different images.
This method can expand the recognition applicability of different images, improve the accuracy and reliability of image recognition, and get rid of the dependence on specific image features.
Smart Images

Figure CN115035043B_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the field of image processing, and in particular to an image processing method based on an embedded system. [Background technology]
[0002] At present, image recognition processing usually uses image features such as color and contour contained in the image as a reference benchmark to determine the image content contained in the image. If the image itself does not have image features such as color and / or contour, the existing image recognition method will not be able to accurately identify the image content contained in the image. It can be seen that the existing image recognition method has certain applicability limitations and cannot be generalized and applied to all types of images, which reduces the accuracy and reliability of image recognition. [Summary of the invention]
[0003] The purpose of the present invention is to provide an image processing method based on an embedded system, which utilizes an embedded computer to instruct a camera to collect images, and pre-processes the images, and retains or discards different images according to the quality judgment results of the pre-processed images; then the embedded computer is trained with a PC model, and the images are analyzed and processed by the PC model to obtain the image content contained in the images; according to the image content, the images are classified and processed to integrate all images into image sets belonging to different image types; then, according to the image acquisition request from an external terminal, matching images are screened from the image set; the above-mentioned image processing method mainly uses the PC model of a neural network to perform image content recognition on the collected images, and its recognition process does not rely on a certain image feature as a benchmark, so that the recognition applicability of different images can be expanded and the accuracy and reliability of image recognition can be improved.
[0004] The objective of the present invention is achieved through the following technical solutions:
[0005] An image processing method based on an embedded system comprises the following steps:
[0006] Step S1, using an embedded computer to instruct a camera to collect images, and preprocessing the collected images; performing quality judgment on each frame of the preprocessed images, and retaining the corresponding images according to the results of the quality judgment;
[0007] Step S2, training the PC model on the embedded computer; inputting the above-mentioned retained image into the trained PC model, analyzing and processing the input image through the PC model, and determining the image content contained in each frame of the input image;
[0008] Step S3, classifying each frame of image according to the image content contained in each frame of image, determining the image type to which each frame of image belongs; and integrating all images into an image set according to the image type to which each frame of image belongs;
[0009] Step S4, according to the image acquisition request from the external terminal, screening matching images from the image set; and sending the screened images to the external terminal.
[0010] In one embodiment, in step S1, using an embedded computer to instruct a camera to capture an image specifically includes:
[0011] An image shooting instruction is sent to the camera through the embedded computer, instructing the camera to shoot the target object at a predetermined shooting frequency, thereby obtaining an image of the target object;
[0012] The captured image is written into the storage chip of the camera for buffering, and then the pixel data of each frame of the buffered image is sequentially read from the storage chip, and the read pixel data is uploaded to the embedded computer.
[0013] In one embodiment, the step S1 further includes:
[0014] When the amount of image data cached by the storage chip of the camera exceeds a preset data amount threshold, the pixel data of each cached image frame is read in sequence according to the shooting time order of each frame of the image from first to last;
[0015] After all pixel data of each frame of image are uploaded to the embedded computer, the corresponding image data is sent to the display through the embedded computer, so that the display displays the corresponding image.
[0016] In one embodiment, in step S1, preprocessing the acquired image specifically includes:
[0017] After the acquired image is uploaded to the embedded computer, the embedded computer is used to perform grayscale processing, image downsampling processing, binarization processing, and expansion processing on the image in sequence.
[0018] In one embodiment, in step S1, grayscale processing of the image specifically includes:
[0019] Use the following formula to grayscale the pixels of the image, thereby converting the image from a color image to a grayscale image.
[0020] Gray=R×0.229+G×0.587+B×0.114
[0021] In the above formula, Gray represents the gray value of the pixel in the gray image obtained after gray processing, and R, G, and B represent the red chromaticity value, green chromaticity value, and blue chromaticity value of the pixel in the color image before gray processing, respectively;
[0022] as well as,
[0023] In step S1, performing image downsampling processing on the image specifically includes:
[0024] The grayscale image obtained after grayscale processing is subjected to image downsampling processing based on bilinear interpolation.
[0025] In one embodiment, in step S1, performing binary processing on the image specifically includes:
[0026] Compare the grayscale values of each pixel contained in the image after image downsampling; when the grayscale value of the pixel is greater than or equal to the preset grayscale threshold, the grayscale value of the corresponding pixel is set to 255; when the grayscale value of the pixel is less than the preset grayscale threshold, the grayscale value of the corresponding pixel is set to 0;
[0027] as well as,
[0028] In step S1, the image expansion process specifically includes:
[0029] Perform image brightness uniformity processing on the image.
[0030] In one embodiment, in step S1, quality judgment is performed on each frame of the preprocessed image, and according to the result of the quality judgment, retaining the corresponding image specifically includes:
[0031] The image pixel resolution value of each frame of the preprocessed image is obtained. If the image pixel resolution value is greater than or equal to a preset resolution threshold, the corresponding image is retained; if the image pixel resolution value is less than the preset resolution threshold, the corresponding image is discarded.
[0032] In one embodiment, in step S2, the PC model on the embedded computer is trained; the retained image is input into the trained PC model, and the input image is analyzed and processed by the PC model to determine that the image content contained in each frame of the input image specifically includes:
[0033] Loading a training set into the PC model on the embedded computer for training, so that the trained PC model meets the preset learning rate range;
[0034] The retained image is input into the trained PC model, and the PC model is used to identify the image content contained in the input image; wherein the image content includes characters and / or shapes existing in the image screen.
[0035] In one embodiment, in step S3, each frame of image is classified according to the image content contained in each frame of image to determine the image type to which each frame of image belongs; and according to the image type to which each frame of image belongs, all images are integrated into an image set, specifically including:
[0036] According to all characters and shapes existing in the image screen of each frame of image, multiple classification processing is performed on each frame of image to determine whether each frame of image is a pure character image, a pure shape image, or a mixed image of characters and shapes;
[0037] Then, pure character images, pure shape images, and mixed characters and shapes images are classified and divided into corresponding image sets.
[0038] In one embodiment, in step S4, according to the image acquisition request from the external terminal, the matching images are screened from the image set; and sending the screened images to the external terminal specifically includes:
[0039] Extracting the image type required by the external terminal from the image acquisition request from the external terminal;
[0040] According to the acquired image type, images having matching characters and / or shapes are screened out from a corresponding image set;
[0041] The screened images are then compressed and packaged and sent to an external terminal.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] The image processing method based on embedded system provided by the present application utilizes embedded computer to instruct camera to collect images, and pre-processes images, and retains or discards different images according to the quality judgment result of the pre-processed images; then the PC model is trained on the embedded computer, and the images are analyzed and processed by the PC model to obtain the image content contained in the images; according to the image content, the images are classified and processed to integrate all images into image sets belonging to different image types; then, according to the image acquisition request from the external terminal, matching images are screened from the image set; the above-mentioned image processing method mainly uses the PC model in the neural network to perform image content recognition on the collected images, and its recognition process does not rely on a certain image feature as a benchmark, so that the recognition applicability of different images can be expanded and the accuracy and reliability of image recognition can be improved.
Brief Description of the Drawings
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0045] Figure 1 It is a flowchart of the image processing method based on the embedded system provided by this application. [Specific implementation method]
[0046] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some structures related to the present application are shown in the accompanying drawings, rather than all structures. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0047] The terms "including" and "having" and any variations thereof in this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0048] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0049] See also Figure 1 As shown, an image processing method based on an embedded system provided by an embodiment of the present application includes the following steps:
[0050] Step S1, using an embedded computer to instruct a camera to collect images, and preprocessing the collected images; performing quality judgment on each frame of the preprocessed images, and retaining the corresponding images according to the results of the quality judgment;
[0051] Step S2, training the PC model on the embedded computer; inputting the above-mentioned retained image into the trained PC model, analyzing and processing the input image through the PC model, and determining the image content contained in each frame of the input image;
[0052] Step S3, classifying each frame of image according to the image content contained in each frame of image, determining the image type to which each frame of image belongs; and integrating all images into an image set according to the image type to which each frame of image belongs;
[0053] Step S4, according to the image acquisition request from the external terminal, filter out matching images from the image collection; and send the filtered images to the external terminal.
[0054] The above-mentioned image processing method uses an embedded computer to instruct a camera to collect images and pre-process the images, and retains or discards different images based on the quality judgment results of the pre-processed images; then the PC model is trained on the embedded computer, and the images are analyzed and processed through the PC model to obtain the image content contained in the images; according to the image content, the images are classified and processed to integrate all images into image sets belonging to different image types; then, according to the image acquisition request from the external terminal, matching images are screened from the image set; the above-mentioned image processing method mainly uses the PC model of the neural network to perform image content recognition on the collected images, and its recognition process does not rely on a certain image feature as a benchmark, which can expand the recognition applicability of different images and improve the accuracy and reliability of image recognition.
[0055] Optionally, in step S1, using the embedded computer to instruct the camera to collect images specifically includes:
[0056] An image shooting instruction is sent to the camera through the embedded computer, instructing the camera to shoot the target object at a predetermined shooting frequency, thereby obtaining an image of the target object;
[0057] The captured image is written into the storage chip of the camera for caching, and then the pixel data of each frame of the cached image is sequentially read from the storage chip, and the read pixel data is uploaded to the embedded computer.
[0058] An image capture instruction is sent to the camera through the embedded computer, so that the camera can perform capture operations on the target object in different viewing angles and focal lengths according to the instruction content in the image capture instruction; then the captured image is cached in the storage chip, which ensures that the captured image is fully and completely uploaded to the embedded computer.
[0059] Optionally, in step S1, it also includes:
[0060] When the amount of image data cached by the storage chip of the camera exceeds a preset data amount threshold, the pixel data of each cached image frame is read in sequence according to the shooting time order of each frame of the image from first to last;
[0061] After all pixel data of each frame of image are uploaded to the embedded computer, the corresponding image data is sent to the display through the embedded computer, so that the display displays the corresponding image.
[0062] When the amount of image data cached by the camera's storage chip exceeds the preset data volume threshold, it indicates that the storage chip has reached the corresponding image data storage upper limit. At this time, the pixel data of the image currently stored in the storage chip is uploaded to the embedded computer in sequence, and the corresponding image is displayed on the display through the embedded computer. This makes it easier for users to obtain the image captured by the camera in real time, improving the visualization of the captured image.
[0063] Optionally, in step S1, preprocessing the acquired image specifically includes:
[0064] After the acquired image is uploaded to the embedded computer, the embedded computer is used to perform grayscale processing, image downsampling processing, binarization processing, and expansion processing on the image in sequence.
[0065] The embedded computer is used to perform grayscale processing, image downsampling processing, binarization processing, and expansion processing on the image in sequence, which can reduce the noise components in the image.
[0066] Optionally, in step S1, grayscale processing of the image specifically includes:
[0067] Use the following formula to grayscale the pixels of the image, thereby converting the image from a color image to a grayscale image.
[0068] Gray=R×0.229+G×0.587+B×0.114
[0069] In the above formula, Gray represents the gray value of the pixel in the gray image obtained after gray processing, and R, G, and B represent the red chromaticity value, green chromaticity value, and blue chromaticity value of the pixel in the color image before gray processing, respectively;
[0070] as well as,
[0071] In step S1, performing image downsampling processing on an image specifically includes:
[0072] The grayscale image obtained after grayscale processing is subjected to image downsampling processing based on bilinear interpolation.
[0073] By performing grayscale processing and image downsampling processing on the image in the above manner, the amount of image data can be effectively compressed, which facilitates the efficiency of subsequent recognition and analysis of the image.
[0074] Optionally, in step S1, performing binary processing on the image specifically includes:
[0075] Compare the grayscale values of each pixel contained in the image after image downsampling; when the grayscale value of the pixel is greater than or equal to the preset grayscale threshold, the grayscale value of the corresponding pixel is set to 255; when the grayscale value of the pixel is less than the preset grayscale threshold, the grayscale value of the corresponding pixel is set to 0;
[0076] as well as,
[0077] In step S1, the image expansion process specifically includes:
[0078] Perform image brightness uniformity processing on the image.
[0079] By performing binary processing and dilation processing on the image in the above manner, the image brightness distribution characteristics of the image can be improved.
[0080] Optionally, in step S1, performing quality judgment on each frame of the preprocessed image, and retaining the corresponding image according to the result of the quality judgment specifically includes:
[0081] The image pixel resolution value of each frame of the preprocessed image is obtained. If the image pixel resolution value is greater than or equal to a preset resolution threshold, the corresponding image is retained; if the image pixel resolution value is less than the preset resolution threshold, the corresponding image is discarded.
[0082] By using the above method, the quality of the pixel resolution of the image is judged, and images with lower pixel resolution quality can be discarded, and only images with higher pixel resolution quality are retained, which can ensure the reliability of subsequent image analysis.
[0083] Optionally, in step S2, the PC model on the embedded computer is trained; the above-mentioned retained image is input into the trained PC model, and the input image is analyzed and processed by the PC model to determine that the image content contained in each frame of the input image specifically includes:
[0084] Loading a training set into the PC model on the embedded computer for training, so that the trained PC model meets the preset learning rate range;
[0085] The retained image is input into the trained PC model, and the PC model is used to identify the image content contained in the input image; wherein the image content includes characters and / or shapes existing in the image screen.
[0086] Through the above method, the PC model in the form of a neural network on the embedded computer is trained, which can improve the accuracy of subsequent learning and analysis of the input image by the PC model and improve the recognition efficiency of the input image.
[0087] Optionally, in step S3, each frame of image is classified according to the image content contained in each frame of image to determine the image type to which each frame of image belongs; and according to the image type to which each frame of image belongs, all images are integrated and converted into an image set, which specifically includes:
[0088] According to all characters and shapes existing in the image screen of each frame of image, multiple classification processing is performed on each frame of image to determine whether each frame of image is a pure character image, a pure shape image, or a mixed image of characters and shapes;
[0089] Then, pure character images, pure shape images, and mixed characters and shapes images are classified and divided into corresponding image sets.
[0090] Through the above method, the image is classified in a multi-dimensional form based on all the characters and shapes in the image screen of each frame. This can get rid of the limitations of image features such as image color and image contour as the benchmark and expand the versatility of recognition and analysis of different types of images.
[0091] Optionally, in step S4, according to the image acquisition request from the external terminal, a matching image is screened from the image set; and sending the screened image to the external terminal specifically includes:
[0092] Extracting the image type required by the external terminal from the image acquisition request from the external terminal;
[0093] According to the acquired image type, images having matching characters and / or shapes are screened out from the corresponding image set;
[0094] The screened images are then compressed and packaged and sent to an external terminal.
[0095] The image type required by the external terminal is extracted from the image acquisition request from the external terminal, so that suitable matching images can be quickly and accurately screened out from different image sets, thereby improving the image search efficiency.
[0096] The above is only a specific implementation of the present invention, and any other improvements made based on the concept of the present invention are considered to be within the protection scope of the present invention.
Claims
1. An image processing method based on an embedded system, characterized in that: It includes the following steps: Step S1, using an embedded computer to instruct a camera to collect images, and preprocessing the collected images; performing quality judgment on each frame of the preprocessed images, and retaining the corresponding images according to the results of the quality judgment; Step S2, training the PC model on the embedded computer; inputting the above-mentioned retained image into the trained PC model, analyzing and processing the input image through the PC model, and determining the image content contained in each frame of the input image; Step S3, classifying each frame of image according to the image content contained in each frame of image, and determining the image type to which each frame of image belongs; And according to the image type of each frame image, all images are integrated and converted into an image set; Step S4, screening matching images from the image set according to an image acquisition request from an external terminal; Sending the screened images to an external terminal; In step S1, using the embedded computer to instruct the camera to collect images specifically includes: An image shooting instruction is sent to the camera through the embedded computer, instructing the camera to shoot the target object at a predetermined shooting frequency, thereby obtaining an image of the target object; Writing the captured image into the storage chip of the camera for caching, then sequentially reading the pixel data of each frame of the cached image from the storage chip, and uploading the read pixel data to the embedded computer; In step S1, preprocessing the acquired image specifically includes: After the acquired image is uploaded to the embedded computer, the embedded computer is used to sequentially perform grayscale processing, image downsampling processing, binarization processing, and dilation processing on the image; In step S1, grayscale processing of the image specifically includes: Use the following formula to grayscale the pixels of the image, thereby converting the image from a color image to a grayscale image. G0y=R×0.229+GX0.587+BX0.114 In the above formula, Gray represents the gray value of the pixel in the gray image obtained after gray processing, and R, G, and B represent the red chromaticity value, green chromaticity value, and blue chromaticity value of the pixel in the color image before gray processing, respectively; as well as, In step S1, performing image downsampling processing on the image specifically includes: Performing image downsampling processing based on bilinear interpolation on the grayscale image obtained after grayscale processing; In step S2, the PC model on the embedded computer is trained; the retained image is input into the trained PC model, and the input image is analyzed and processed by the PC model to determine the image content contained in each frame of the input image, which specifically includes: Loading a training set into the PC model on the embedded computer for training, so that the trained PC model meets the preset learning rate range; Input the retained image into the trained PC model, and use the PC model to identify the image content contained in the input image; wherein the image content includes characters and / or shapes existing in the image screen; In step S3, each frame of image is classified according to the image content contained in each frame of image to determine the image type to which each frame of image belongs; and according to the image type to which each frame of image belongs, all images are integrated and converted into an image set, which specifically includes: According to all characters and shapes existing in the image screen of each frame of image, multiple classification processing is performed on each frame of image to determine whether each frame of image is a pure character image, a pure shape image, or a mixed image of characters and shapes; Then, pure character images, pure shape images, and mixed characters and shapes images are classified and divided into corresponding image sets.
2. The image processing method based on embedded system according to claim 1, characterized in that: In the step S1, it also includes: When the amount of image data cached by the storage chip of the camera exceeds a preset data amount threshold, the pixel data of each cached image frame is read in sequence according to the shooting time order of each frame of the image from first to last; After all pixel data of each frame of image are uploaded to the embedded computer, the corresponding image data is sent to the display through the embedded computer, so that the display displays the corresponding image.
3. The image processing method based on embedded system according to claim 1, characterized in that: In step S1, performing binary processing on the image specifically includes: Compare the grayscale values of each pixel contained in the image after image downsampling; when the grayscale value of the pixel is greater than or equal to the preset grayscale threshold, the grayscale value of the corresponding pixel is set to 255; when the grayscale value of the pixel is less than the preset grayscale threshold, the grayscale value of the corresponding pixel is set to 0; as well as, In step S1, the image expansion process specifically includes: Perform image brightness uniformity processing on the image.
4. The image processing method based on embedded system according to claim 1, characterized in that: In the step S1, the quality of each frame of the preprocessed image is judged, and according to the result of the quality judgment, the corresponding image is retained, which specifically includes: The image pixel resolution value of each frame of the preprocessed image is obtained. If the image pixel resolution value is greater than or equal to a preset resolution threshold, the corresponding image is retained; if the image pixel resolution value is less than the preset resolution threshold, the corresponding image is discarded.
5. The image processing method based on embedded system according to claim 1, characterized in that: In the step S4, according to the image acquisition request from the external terminal, matching images are screened from the image set; Sending the screened image to an external terminal specifically includes: Extracting the image type required by the external terminal from the image acquisition request from the external terminal; According to the acquired image type, images having matching characters and / or shapes are screened out from a corresponding image set; The screened images are then compressed and packaged and sent to an external terminal.
Citation Information
Patent Citations
Data acquisition method and system based on computer vision technology
CN112364844A
Image processing method and system
CN113344878A