Video image processing system and method
Through the automatic interception and optimization function of the video image processing system, the problem of cumbersome video image processing in the prior art is solved, fast and automated high-quality image acquisition is achieved, and processing efficiency is improved.
Patent Information
- Application Number
- CN202411115216.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-03
AI Technical Summary
Existing video image processing technology is difficult to quickly and automatically intercept the target object image, resulting in cumbersome processing steps and requires manual operation.
A video image processing system is designed, including a video acquisition module, an image interception module, an image quality judgment module, an image optimization module and an image size matching module. The image gradient is calculated through the object detection algorithm and the Prewitt operator, and the image is automatically intercepted and optimized. And automatically or manually judge and crop according to image quality.
It realizes fast and automatic intercepting of high-quality images from videos, reduces manual intervention, significantly saves time and labor costs, and improves processing speed and efficiency.
Smart Images

Figure CN119067931A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of video image processing, and in particular relates to a system and method for video image processing. Background Art
[0002] Video image processing technology refers to the technology of processing and analyzing images in video sequences to improve video quality, extract useful information or realize specific functions. The existing video image processing technology is widely used in security monitoring, medical imaging, entertainment industry, autonomous driving and traffic monitoring.
[0003] However, the video image processing technology in the prior art usually does not have the function of intercepting the image of the target object from a video. After capturing a video, when the image of the target object needs to be intercepted, it is usually necessary to manually intercept the image of the target object, which makes the video image processing steps more troublesome. Therefore, a system and method for video image processing are proposed. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention provides a system and method for video image processing, which can quickly capture clear and high-quality image data from a video, making video processing faster.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A video image processing system comprises a video acquisition module, a picture capture module, an image quality judgment module, an image optimization module, and an image size matching module, wherein the video acquisition module, the picture capture module, the image quality judgment module, the image optimization module, and the image size matching module are sequentially connected in communication;
[0007] The video acquisition module includes a camera device, which is responsible for capturing video images and transmitting the captured images to the picture capture module;
[0008] The image capture module is used to capture images in the video, capture images according to received target requirements, and transmit the captured images to the image quality judgment module;
[0009] The image quality judgment module processes the image, judges the image clarity, and divides the image into three levels: low quality, medium quality, and high quality. The image with low clarity is low quality, and the low-quality image will be directly eliminated and intercepted twice. The image with medium clarity is medium quality, and the medium-quality image will be manually judged. The image with high clarity is high quality, and the high-quality image will be directly transmitted to the image optimization module;
[0010] The image optimization module is used to optimize the high-quality image or the image after manual judgment to further improve the image quality;
[0011] The image size matching module automatically crops the image according to the input image size, and directly outputs it to the original size when there is no size requirement.
[0012] Furthermore, the video acquisition module includes a camera device, which is responsible for capturing video images and transmitting the captured images to the image capture module. The processing process is as follows:
[0013] The camera device starts shooting video, and after the video shooting is completed, it will be transmitted to the picture capture module; block.
[0014] Furthermore, the picture capture module is used to capture images in the video, capture the images according to the received target requirements, and transmit the captured images to the image quality judgment module. The processing process is as follows:
[0015] Receive video frame data and perform normalization processing. After the processing is completed, according to the received target requirements, use the target detection algorithm to detect and identify the target of the video frame. The target requirement is a specific object. The specific steps are as follows: first, divide the image into S×S grids, each grid is responsible for detecting the target that falls in the grid in the image. Suppose the image size is W×H, divide it into S×S grids, and the side length of each grid is and Then, multiple bounding boxes are predicted based on each grid, and each bounding box BBox is represented by the center coordinate (X C ,Y C ), width w and height h, and confidence level, the formula is:
[0016] BBox=(X C ,Y C ,w,h);
[0017] There are C class probabilities of the predicted target for each grid, and the predicted value of the class probability is:
[0018] P i =Softmax(z i );
[0019] Among them, z i is the prediction score of the i-th class, P i The predicted probability of the i-th category reflects the model's confidence in the category. The confidence, bounding box regression and category probability are combined, and duplicate boxes are removed through non-maximum suppression to obtain the final detection result;
[0020] A plurality of images are captured according to the detection results, and the captured images are transmitted to the image quality judgment module.
[0021] When a large number of images or videos need to be processed, automatic object recognition and image capture can reduce manual intervention and operations, significantly save time and labor costs, and improve processing speed.
[0022] Furthermore, the image quality judgment module processes the image, judges the image clarity, and divides the image into three levels: low quality, medium quality, and high quality. The image with low clarity is of low quality, and the low-quality image will be directly eliminated and intercepted twice. The image with medium clarity is of medium quality, and the medium-quality image will be manually judged. The image with high clarity is of high quality, and the high-quality image will be directly transmitted to the image optimization module for processing as follows:
[0023] The received intercepted image is processed and the gradient of the image is calculated using the Prewitt operator. The convolution kernel of the Prewitt operator is as follows:
[0024] Horizontal Gradient:
[0025] Vertical Gradient:
[0026] The gradient amplitude and gradient direction are obtained by calculating the horizontal gradient and the vertical gradient, and then the sum of the gradient amplitudes and the variance of the gradient amplitudes are calculated. The threshold range of the sum of the gradient amplitudes and the variance of the gradient amplitudes is preset. When the variance of the sum of the gradient amplitudes and the gradient amplitudes is greater than the maximum value of the threshold range, it is judged as an image with high definition, and then the image is divided into a high-quality image. When the variance of the sum of the gradient amplitudes and the gradient amplitudes is within the threshold range, it is judged as an image with medium definition, and then the image is divided into a medium-quality image. When the variance of the sum of the gradient amplitudes and the gradient amplitudes is less than the minimum value of the threshold range, it is judged as an image with low definition, and then the image with low definition is divided into a low-quality image. The high-quality image will be directly transmitted to the image optimization module, the medium-quality image will be manually judged, and the low-quality image will be directly eliminated;
[0027] By calculating the sum of the gradient amplitudes and the variance of the gradient amplitudes, the image quality can be automatically judged and the images can be graded to facilitate the next step.
[0028] Furthermore, the image optimization module is used to optimize the high-quality image or the image after manual judgment, and the processing process of further improving the image quality is as follows:
[0029] First, use Gaussian filtering to smooth the image and reduce noise, then automatically perform histogram equalization to improve image contrast. After the contrast is improved, apply the automatic sharpening algorithm to improve the details and edge clarity of the image, and finally automatically adjust the color balance and saturation.
[0030] Ensures colors look natural and accurate by automatically adjusting the color balance of an image; makes colors richer by automatically increasing or decreasing the color saturation of an image
[0031] The processed image is automatically enhanced for local contrast and details. When there are defects or damage in the image, an automatic repair algorithm is used to fill the missing area to complete the image optimization processing.
[0032] Furthermore, the image size matching module automatically crops the image according to the manually input image size, and directly outputs the image to the original size when there is no size requirement. The processing process is as follows:
[0033] Get the original image and its size information, which includes image width and height. If the target size is not entered, skip the cropping step and directly output the original image.
[0034] When manual input has size requirements, the target width and height are obtained, the center point of the target area is found in the original image, and then the boundary of the cropping frame is determined according to the target size. The target area is extracted from the original image according to the calculated cropping frame to ensure that the cropping area is valid within the image range and avoids exceeding the image boundary. Finally, the cropped image is transmitted to generate the final image.
[0035] Automatic cropping reduces the need for manual image resizing and speeds up processing.
[0036] A method for video image processing, characterized in that it specifically comprises the following steps:
[0037] S1, automatically collects the data video of the camera, and at the same time, the operator manually enters the name of the object to be captured, so as to facilitate the next step of image capture;
[0038] S2, analyzes the collected video frame by frame, performs target detection, detects objects in the video and captures images. If the operator does not input specific requirements, random target detection will be performed and images will be automatically captured;
[0039] S3, judging the quality of the screenshot image, judging the image clarity by calculating the sum of the gradient amplitude and the variance of the gradient amplitude, and comparing the calculated data with the preset threshold to divide the image quality level into low quality, medium quality and high quality, respectively. Low-quality images will be directly eliminated, medium-quality images will be manually judged, and high-quality images will be processed in the next step;
[0040] S4, automatically optimizing the captured image, including: noise removal, image enhancement, sharpening, color adjustment, local contrast and detail automatic enhancement;
[0041] S5. Automatically crop the image according to the manually input size requirement, and finally output the cropped image. When there is no size requirement, the original image will be directly output.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] After a video is obtained, when the target object is manually input, the video will be analyzed frame by frame. During the frame by frame analysis, the target will be detected automatically. After the target object is detected, the image of the target object will be automatically captured. This step makes image processing more efficient.
[0044] The captured images will be automatically divided into three levels: low quality, medium quality, and high quality. Low quality images will be directly eliminated, medium quality images will be manually judged, and high quality images will continue to the next step. This step can make the image quality higher. When the image quality is all low quality, it will be captured again to ensure the image quality of the screenshot;
[0045] Medium-quality or high-quality images that have been manually judged will be automatically optimized to further improve the image quality. Finally, they will be cropped according to the manually set size. The entire system has a high degree of automation and can also crop high-quality images that meet the requirements according to specific requirements, thereby improving the efficiency of image processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 The present invention is a system block diagram of video image processing.
[0047] Figure 2 The present invention is a flowchart of a video image processing method. DETAILED DESCRIPTION
[0048] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] like Figure 1-2 As shown, a video image processing system includes a video acquisition module, a picture capture module, an image quality judgment module, an image optimization module, and an image size matching module, wherein the video acquisition module, the picture capture module, the image quality judgment module, the image optimization module, and the image size matching module are sequentially connected in communication;
[0050] The video acquisition module, including a camera device, is responsible for capturing video images and transmitting the captured images to the picture capture module;
[0051] In this embodiment, the video acquisition module includes a camera device, which is responsible for capturing video images and transmitting the captured images to the image capture module. The processing process is as follows:
[0052] The camera device starts to shoot the video, and after the video shooting is completed, it will be transmitted to the image capture module;
[0053] The image capture module is used to capture images in the video, capture images according to the received target requirements, and transmit the captured images to the image quality judgment module;
[0054] In this embodiment, the image capture module is used to capture images in the video, capture images according to the received target requirements, and transmit the captured images to the image quality judgment module. The processing process is as follows:
[0055] Receive video frame data and perform normalization processing. After the processing is completed, according to the received target requirements, use the target detection algorithm to detect and identify the target of the video frame. The target requirement is a specific object. The specific steps are as follows: first, divide the image into S×S grids, each grid is responsible for detecting the target that falls in the grid in the image. Suppose the image size is W×H, divide it into S×S grids, and the side length of each grid is and Then, multiple bounding boxes are predicted based on each grid, and each bounding box BBox is represented by the center coordinate (X C ,Y C ), width w and height h, and confidence level, the formula is:
[0056] BBox=(X C ,Y C ,w,h);
[0057] There are C class probabilities of the predicted target for each grid, and the predicted value of the class probability is:
[0058] P i =Softmax(z i );
[0059] Among them, z i is the prediction score of the i-th class, P i The predicted probability of the i-th category reflects the model's confidence in the category. The confidence, bounding box regression and category probability are combined, and duplicate boxes are removed through non-maximum suppression to obtain the final detection result;
[0060] A plurality of images are captured according to the detection results, and the captured images are transmitted to the image quality judgment module.
[0061] It should be noted that when the operator does not input specific requirements, random target detection will be automatically performed to identify any object in the video. After identification, multiple images will be automatically captured and transmitted to the image quality judgment module.
[0062] The image quality judgment module processes the image, judges the image clarity, and divides the image into three levels: low quality, medium quality, and high quality. The image with low clarity is of low quality, and the low-quality image will be directly eliminated and intercepted for a second time. The image with medium clarity is of medium quality, and the medium-quality image will be manually judged. The image with high clarity is of high quality, and the high-quality image will be directly transmitted to the image optimization module;
[0063] In this embodiment, the image quality judgment module processes the image, judges the image clarity, and divides the image into three levels: low quality, medium quality, and high quality. The image with low clarity is low quality, and the low-quality image will be directly eliminated and intercepted twice. The image with medium clarity is medium quality, and the medium-quality image will be manually judged. The image with high clarity is high quality, and the high-quality image will be directly transmitted to the image optimization module for processing as follows:
[0064] The received intercepted image is processed and the gradient of the image is calculated using the Prewitt operator. The convolution kernel of the Prewitt operator is as follows:
[0065] Horizontal Gradient:
[0066] Vertical Gradient:
[0067] The gradient amplitude and gradient direction are obtained by calculating the horizontal gradient and the vertical gradient, and then the sum of the gradient amplitudes and the variance of the gradient amplitudes are calculated. The threshold range of the sum of the gradient amplitudes and the variance of the gradient amplitudes is preset. When the variance of the sum of the gradient amplitudes and the gradient amplitudes is greater than the maximum value of the threshold range, it is judged as an image with high definition, and then the image is divided into a high-quality image. When the variance of the sum of the gradient amplitudes and the gradient amplitudes is within the threshold range, it is judged as an image with medium definition, and then the image is divided into a medium-quality image. When the variance of the sum of the gradient amplitudes and the gradient amplitudes is less than the minimum value of the threshold range, it is judged as an image with low definition, and then the image with low definition is divided into a low-quality image. The high-quality image will be directly transmitted to the image optimization module, the medium-quality image will be manually judged, and the low-quality image will be directly eliminated;
[0068] It should be noted that when the operator does not input a specific object as the target, images are randomly captured and the quality is judged. When multiple groups of randomly captured images are all low-quality images and are eliminated, secondary capture will be automatically performed to ensure that high-quality images can be obtained.
[0069] Image optimization module, used to optimize high-quality images or images after manual judgment to further improve image quality;
[0070] In this embodiment, the image optimization module is used to optimize the high-quality image or the image after manual judgment, and the processing process of further improving the image quality is as follows:
[0071] First, use Gaussian filtering to smooth the image and reduce noise, then automatically perform histogram equalization to improve image contrast. After the contrast is improved, apply the automatic sharpening algorithm to improve the details and edge clarity of the image, and finally automatically adjust the color balance and saturation.
[0072] The processed image is automatically enhanced for local contrast and details. When there are defects or damage in the image, an automatic repair algorithm is used to fill the missing area to complete the image optimization processing.
[0073] It should be noted that the automated image optimization process includes denoising, image enhancement, sharpening, color adjustment, local contrast and automatic detail enhancement. These steps can ensure that the image is optimized in all aspects, thereby improving the overall quality. At the same time, these steps are all processed automatically, which can also make image optimization more efficient and consistent.
[0074] Image size matching module, which automatically crops the image according to the input image size. If there is no size requirement, it will be directly output to the original size.
[0075] In this embodiment, the image size matching module automatically crops the image according to the manually input image size. When there is no size requirement, the processing process of directly outputting the image to the original size is as follows:
[0076] Get the original image and its size information, which includes image width and height. If the target size is not entered, skip the cropping step and directly output the original image.
[0077] When manual input has size requirements, the target width and height are obtained, the center point of the target area is found in the original image, and then the boundary of the cropping frame is determined according to the target size. The target area is extracted from the original image according to the calculated cropping frame to ensure that the cropping area is valid within the image range and avoids exceeding the image boundary. Finally, the cropped image is transmitted to generate the final image.
[0078] It should be noted that center cropping can ensure that the key part of the image is always retained in the cropped image, thereby maintaining the visual quality, and the automated processing can handle input images of different sizes, making image processing more flexible.
[0079] A video image processing method specifically comprises the following steps:
[0080] S1, automatically collect the data video of the camera, and at the same time, the operator manually enters the name of the object to be captured, so as to facilitate the next step of image capture;
[0081] S2, analyzes the collected video frame by frame, performs target detection, detects objects in the video and captures images. If the operator does not input specific requirements, random target detection will be performed and images will be automatically captured;
[0082] S3, judging the quality of the screenshot image, judging the image clarity by calculating the sum of the gradient amplitude and the variance of the gradient amplitude, and comparing the calculated data with the preset threshold to divide the image quality level into low quality, medium quality and high quality, respectively. Low-quality images will be directly eliminated, medium-quality images will be manually judged, and high-quality images will be processed in the next step;
[0083] S4, automatically optimizing the captured image, including: denoising, image enhancement, sharpening, color adjustment, local contrast and detail automatic enhancement;
[0084] S5. Automatically crop the image according to the manually input size requirement, and finally output the cropped image. When there is no size requirement, the original image will be directly output.
[0085] In the embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation; the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the method of this embodiment.
[0086] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A video image processing system, characterized in that: It includes a video acquisition module, a picture capture module, an image quality judgment module, an image optimization module, and an image size matching module, wherein the video acquisition module, the picture capture module, the image quality judgment module, the image optimization module, and the image size matching module are sequentially connected in communication; The video acquisition module includes a camera device, which is responsible for capturing video images and transmitting the captured images to the picture capture module; The image capture module is used to capture images in the video, capture images according to the received target requirements, and transmit the captured images to the image quality judgment module; The image quality judgment module processes the image, judges the image clarity, and divides the image into three levels: low quality, medium quality, and high quality. The image with low clarity is low quality, and the low-quality image will be directly eliminated and intercepted twice. The image with medium clarity is medium quality, and the medium-quality image will be manually judged. The image with high clarity is high quality, and the high-quality image will be directly transmitted to the image optimization module; The image optimization module is used to optimize the high-quality image or the image after manual judgment to further improve the image quality; The image size matching module automatically crops the image according to the input image size, and directly outputs it to the original size when there is no size requirement.
2. A video image processing system according to claim 1, characterized in that: The video acquisition module includes a camera device, which is responsible for capturing video images and transmitting the captured images to the image capture module. The processing process is as follows: The camera device starts shooting video, and after the video shooting is completed, it will be transmitted to the picture capture module; block.
3. The video image processing system according to claim 1, characterized in that: The image capture module is used to capture images in the video, capture images according to the received target requirements, and transmit the captured images to the image quality judgment module. The processing process is as follows: Receive video frame data and perform normalization processing. After the processing is completed, according to the received target requirements, use the target detection algorithm to detect and identify the target of the video frame. The target requirement is a specific object. The specific steps are as follows: first, divide the image into S×S grids, each grid is responsible for detecting the target that falls in the grid in the image. Suppose the image size is W×H, divide it into S×S grids, and the side length of each grid is and Then, multiple bounding boxes are predicted based on each grid, and each bounding box BBox is represented by the center coordinate (X C ,Y C ), width w and height h, and confidence level, the formula is: BBox=(X C ,Y C ,w,h); There are C class probabilities of the predicted target for each grid, and the predicted value of the class probability is: P i =Softmax(z i ); Among them, z i is the prediction score of the i-th class, P i The predicted probability of the i-th category reflects the model's confidence in the category. The confidence, bounding box regression and category probability are combined, and duplicate boxes are removed through non-maximum suppression to obtain the final detection result; A plurality of images are captured according to the detection results, and the captured images are transmitted to the image quality judgment module.
4. The video image processing system according to claim 1, characterized in that: The image quality judgment module processes the image, judges the image clarity, and divides the image into three levels: low quality, medium quality, and high quality. The image with low clarity is low quality, and the low-quality image will be directly eliminated and intercepted twice. The image with medium clarity is medium quality, and the medium-quality image will be manually judged. The image with high clarity is high quality, and the high-quality image will be directly transmitted to the image optimization module for processing as follows: The received intercepted image is processed and the gradient of the image is calculated using the Prewitt operator. The convolution kernel of the Prewitt operator is as follows: Horizontal Gradient: Vertical Gradient: The gradient amplitude and gradient direction are obtained by calculating the horizontal gradient and the vertical gradient, and then the sum of the gradient amplitudes and the variance of the gradient amplitudes are calculated. The threshold range of the sum of the gradient amplitudes and the variance of the gradient amplitudes is preset. When the variance of the sum of the gradient amplitudes and the gradient amplitudes is greater than the maximum value of the threshold range, it is judged as an image with high clarity, and the image is then divided into a high-quality image. When the variance of the sum of the gradient amplitudes and the gradient amplitudes is within the threshold range, it is judged as an image with medium clarity, and the image is then divided into a medium-quality image. When the variance of the sum of the gradient amplitudes and the gradient amplitudes is less than the minimum value of the threshold range, it is judged as an image with low clarity, and the image with low clarity is then divided into a low-quality image. The high-quality image will be directly transmitted to the image optimization module, the medium-quality image will be manually judged, and the low-quality image will be directly eliminated.
5. The video image processing system according to claim 1, characterized in that: The image optimization module is used to optimize high-quality images or images after manual judgment, and the processing process of further improving the image quality is as follows: First, use Gaussian filtering to smooth the image and reduce noise, then automatically perform histogram equalization to improve image contrast. After the contrast is improved, apply the automatic sharpening algorithm to improve the details and edge clarity of the image, and finally automatically adjust the color balance and saturation. The processed image is automatically enhanced for local contrast and details. When there are defects or damage in the image, an automatic repair algorithm is used to fill the missing area to complete the image optimization processing.
6. The video image processing system according to claim 1, characterized in that: The image size matching module automatically crops the image according to the manually input image size. When there is no size requirement, the image is directly output to the original size. The processing process is as follows: Get the original image and its size information, which includes image width and height. If the target size is not entered, skip the cropping step and directly output the original image. When manual input has size requirements, the target width and height are obtained, the center point of the target area is found in the original image, and then the boundary of the cropping frame is determined according to the target size. The target area is extracted from the original image according to the calculated cropping frame to ensure that the cropping area is valid within the image range and avoids exceeding the image boundary. Finally, the cropped image is transmitted to generate the final image.
7. A video image processing method according to any one of claims 1 to 6, characterized in that: The method specifically comprises the following steps: S1, automatically collects the data video of the camera, and at the same time, the operator manually enters the name of the object to be captured, so as to facilitate the next step of image capture; S2, analyzes the collected video frame by frame, performs target detection, detects objects in the video and captures images. If the operator does not input specific requirements, random target detection will be performed and images will be automatically captured; S3, judging the quality of the screenshot image, judging the image clarity by calculating the sum of the gradient amplitude and the variance of the gradient amplitude, and comparing the calculated data with the preset threshold to divide the image quality level into low quality, medium quality and high quality, respectively. Low-quality images will be directly eliminated, medium-quality images will be manually judged, and high-quality images will be processed in the next step; S4, automatically optimizing the captured image, including: noise removal, image enhancement, sharpening, color adjustment, local contrast and detail automatic enhancement; S5. Automatically crop the image according to the manually input size requirement, and finally output the cropped image. When there is no size requirement, the original image will be directly output.
