Image processing method, device and system
By intercepting and transmitting ROI images in the original data format on the video surveillance front-end equipment, the problem of information loss during image transmission and processing is solved, the effect of image enhancement processing and recognition accuracy are improved, and it is suitable for video surveillance systems in complex scenes.
Patent Information
- Application Number
- CN201910651714.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-18
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2039-07-18
AI Technical Summary
Existing video surveillance systems have limited improvements in target recognition accuracy due to data bit width cropping and information loss during image transmission and processing. Especially under the influence of factors such as lighting, camera installation height, and target movement, image quality varies. It is difficult to effectively improve the recognition accuracy.
The video surveillance front-end equipment collects image frames in the original data format for processing. After determining the target location information, the region of interest (ROI) is intercepted and transmitted to the server for enhanced processing to avoid data bit width clipping and information loss, and utilize the computing power of the server. Perform more complex image enhancement algorithm processing.
By transmitting ROI images in original data format, information loss is reduced, the effect of image enhancement processing and recognition accuracy are improved, and it is suitable for complex scenes such as lighting, camera installation height and target movement, and improves image quality and recognition accuracy.
Smart Images

Figure CN112241735B
Abstract
Description
Technical Field
[0001] The present application relates to the field of video surveillance, and in particular to an image processing method, device and system. Background Art
[0002] In recent years, with the rapid development of deep learning technology, target recognition algorithms based on deep learning have gradually matured and have been widely used in monitoring scenarios. For example, face capture machines can detect faces in monitoring images in real time and transmit the detected face images to the server for face recognition; traffic capture machines can help traffic management departments quickly and effectively monitor illegal vehicles and capture and collect evidence of illegal vehicles.
[0003] In comparison tests of some public data sets, the recognition accuracy of target recognition algorithms has even exceeded that of the human eye. However, in actual engineering applications, due to the influence of factors such as lighting, camera mounting height, target motion, etc., the quality of the target images finally obtained varies. Some images have better quality, but in many cases they may be blurry, have insufficient brightness, insufficient contrast, and other poor quality problems.
[0004] In response to the above situation, the current solution is that the video surveillance front end transmits the collected data to the server in an image format suitable for display or transmission, such as RGB (red, green, blue) format, YUV (brightness, chroma, saturation) format or JPEG (Joint Photographic Experts Group) format, and the server performs target recognition after enhancement processing to improve the accuracy of target recognition.
[0005] However, in practice, it is found that the enhancement algorithm in the above solution is processed on image formats suitable for display or transmission, such as RGB format, YUV format or JPEG format, and its data bit width has been cropped. In addition, information loss may occur during the image processing process, which leads to limited improvement in image enhancement processing. Summary of the invention
[0006] In view of this, the present application provides an image processing method, device and system.
[0007] Specifically, the present application is implemented through the following technical solutions:
[0008] According to a first aspect of an embodiment of the present application, there is provided an image processing method, which is applied to a video surveillance front-end device, comprising:
[0009] Collecting and caching image frames in a first data format; the first data format is the original data format after the image sensor converts the captured light source signal into a digital signal;
[0010] Processing the image frame in the first data format to obtain an image frame in a second data format; the second data format is an image format suitable for display or transmission;
[0011] Performing target detection on the image frame in the second data format to determine target position information in the image frame in the second data format;
[0012] Based on the target position information, performing region of interest (ROI) region interception on the cached image frame in the first data format to obtain an ROI region image in the first data format;
[0013] The ROI region image in the first data format is transmitted to a server, so that the server performs enhancement processing on the ROI region image in the first data format to obtain the ROI region image in a second data format.
[0014] According to a second aspect of an embodiment of the present application, there is provided an image processing apparatus, which is applied to a video surveillance front-end device, comprising:
[0015] An acquisition unit, configured to acquire image frames in a first data format; the first data format is an original data format after the image sensor converts the captured light source signal into a digital signal;
[0016] A cache unit, used for caching image frames in the first data format;
[0017] A processing unit, configured to process the image frame in the first data format to obtain an image frame in a second data format; the second data format is an image format suitable for display or transmission;
[0018] a detection unit, configured to perform target detection on the image frame in the second data format to determine target position information in the image frame in the second data format;
[0019] A capture unit, configured to perform region of interest (ROI) region capture on the cached image frame in the first data format based on the target position information, so as to obtain a ROI region image in the first data format;
[0020] The transmission unit is used to transmit the ROI area image in the first data format to the server, so that the server performs enhancement processing on the ROI area image in the first data format to obtain the ROI area image in the second data format.
[0021] According to a third aspect of an embodiment of the present application, there is provided an image processing system, including: a video surveillance front-end device and a server; wherein:
[0022] The video surveillance front-end device is used to collect and cache image frames in a first data format; the first data format is the original data format after the image sensor converts the captured light source signal into a digital signal; the image frame in the first data format is processed to obtain an image frame in a second data format; the second data format is an image format suitable for display or transmission; target detection is performed on the image frame in the second data format to determine the target position information in the image frame in the second data format; based on the target position information, a region of interest (ROI) is intercepted on the cached image frame in the first data format to obtain an ROI region image in the first data format; and the ROI region image in the first data format is transmitted to a server;
[0023] The server is used to perform enhancement processing on the ROI area image in the first data format to obtain the ROI area image in the second data format.
[0024] The image processing method of the embodiment of the present application acquires and caches image frames in a first data format, processes the image frames in the first data format to obtain image frames in a second data format, and performs target detection on the image frames in the second data format to determine target position information in the image frames in the second data format; then, based on the target position information, ROI area interception is performed on the cached image frames in the first data format to obtain an ROI area image in the first data format, and the ROI area image in the first data format is transmitted to a server so that the server performs enhancement processing on the ROI area image in the first data format to obtain an ROI area image in the second data format, thereby improving the effect of image enhancement processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 is a flow chart of an image processing method shown in an exemplary embodiment of the present application;
[0026] Figure 2 It is a structural schematic diagram of a specific application scenario shown in an exemplary embodiment of the present application;
[0027] Figure 3A is a structural schematic diagram of a first processing module shown in an exemplary embodiment of the present application;
[0028] Figure 3B is a schematic diagram of color interpolation shown in an exemplary embodiment of the present application;
[0029] Figure 3C is a structural schematic diagram of a second processing module shown in an exemplary embodiment of the present application;
[0030] Figure 3Dis a structural schematic diagram of a fifth processing module shown in an exemplary embodiment of the present application;
[0031] Figure 3E is a structural schematic diagram of a sixth processing module shown in an exemplary embodiment of the present application;
[0032] Figure 4 is a structural schematic diagram of an image processing device shown in an exemplary embodiment of the present application;
[0033] Figure 5 is a schematic diagram of the hardware structure of an image processing device shown in an exemplary embodiment of the present application;
[0034] Figure 6 It is a structural schematic diagram of an image processing system shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0036] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0037] In order to enable those skilled in the art to better understand the technical solution provided by the embodiments of the present application, the first data format and the second data format described in the present application are briefly described below.
[0038] The first data format refers to the original data format in which the image sensor converts the captured light source signal into a digital signal, and the original data includes sensing data from one or more spectral bands.
[0039] Exemplarily, the raw data may include sensing data obtained by sampling light signals in a spectral band with a wavelength range of 380 nm to 780 nm and / or 780 nm to 2500 nm.
[0040] For example, the RAW (unprocessed) image signal obtained by the RGB sensor.
[0041] Exemplarily, an imaging device collects light source signals, converts the collected light source signals into analog signals, converts the analog signals into digital signals, inputs the digital signals into a processing chip for processing (the processing may include bit width cropping, image processing, and encoding and decoding processing, etc.), obtains data in a second data format, and transmits the data in the second data format to a display device for display or other device for processing.
[0042] It can be seen that the image in the first data format is the image when the imaging device converts the collected light source information into a digital signal. The image has not been processed by the processing chip and has a high bit width. Compared with the image in the second data format that has undergone bit width cropping, image processing and encoding and decoding, it contains richer image information.
[0043] In order to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application are further described in detail below with reference to the accompanying drawings.
[0044] See also Figure 1 , is a flow chart of an image processing method provided in an embodiment of the present application, wherein the image processing method can be applied to a video surveillance front-end device, such as an IPC (Internet Protocol Camera, network camera), such as Figure 1 As shown, the image processing method may include the following steps:
[0045] For ease of description and understanding, the following description takes the execution subject of steps S100 to S140 as an IPC as an example.
[0046] Step S100, collecting and caching image frames in a first data format; the first data format is the original data format after the image sensor converts the captured light source signal into a digital signal.
[0047] In the embodiment of the present application, the IPC may convert the captured light signal into raw data of a digital signal through an image sensor to obtain image data in a first data format.
[0048] Exemplarily, the IPC may cache the acquired image data in the first data format.
[0049] Step S110: Process the image frame in the first data format to obtain an image frame in a second data format, where the second data format is an image format suitable for display or transmission.
[0050] In the embodiment of the present application, for a data image in a first data format corresponding to any frame image (referred to herein as an image frame in the first data format), the IPC can convert it into a second data format suitable for display or transmission.
[0051] Exemplarily, the second data format may include but is not limited to RGB format, YUV format or JPEG format, etc.
[0052] In an example, the processing of the image frame in the first data format may include:
[0053] Performing a preset operation process on the image frame in the first data format;
[0054] The preset operation process includes one or more of the following:
[0055] White balance correction, color interpolation, curve mapping.
[0056] Exemplarily, for any image frame in a first data format, the IPC can convert the image frame in the first data format into an image frame in a second data format through one or more of processes such as white balance correction, color interpolation, and curve mapping (referred to as preset operation processes herein). The specific implementation thereof can be described below in conjunction with specific examples, and the embodiments of the present application will not be elaborated here.
[0057] Step S120: performing target detection on the image frame in the second data format to determine target position information in the image frame in the second data format.
[0058] In an embodiment of the present application, when the IPC obtains an image frame in the second data format, it can perform target detection on the image frame in the second data format to detect targets of interest (such as pedestrians, vehicles, animals, or license plates, etc.).
[0059] For any image frame in the second data format, when the IPC detects a target in the image frame in the second data format, position information of the target in the image frame in the second data format (referred to as target position information in this article) can be determined.
[0060] Step S130 : performing ROI region interception on the cached image frame in the first data format based on the target position information to obtain an ROI region image in the first data format.
[0061] In an embodiment of the present application, when the IPC determines the target position information in an image frame of the second data format, it can perform ROI (Region Of Interest) area capture on the cached image frame of the first data format corresponding to the image frame of the second data format based on the target position information, that is, capture the image of the ROI area from the original image to obtain the ROI area image of the first data format.
[0062] Step S140: Transmit the ROI region image in the first data format to the server, so that the server performs enhancement processing on the ROI region image in the first data format to obtain the ROI region image in the second data format.
[0063] In an embodiment of the present application, considering that the IPC processes an image frame in a first data format into an image frame in a second data format, and transmits the image frame in the second data format to a server, when the server performs enhancement processing, the image enhancement processing will be limited due to the cropping of the data bit width and the loss of information in the image processing process. Therefore, in order to improve the image enhancement effect, the IPC may transmit the ROI area image in the first data format to the server, and the server will perform image enhancement based on the ROI area image in the first data format.
[0064] Exemplarily, when the IPC captures the ROI region image in the first data format in the manner described in the above steps, the IPC may transmit the ROI region image in the first data format to the server.
[0065] When the server receives the ROI region image in the first data format, it may perform enhancement processing on the ROI region image in the first data format to obtain the ROI region image in the second data format.
[0066] Exemplarily, when the server obtains the ROI area image in the second data format, it can perform target recognition on the ROI area image in the second data format, or perform other processing on the ROI area image in the second data format according to a preset strategy. The specific implementation will be explained in conjunction with specific examples below, and the embodiments of the present application will not be elaborated here.
[0067] As a possible implementation manner, the above-mentioned transmitting the ROI region image in the first data format to the server may include:
[0068] The image information of the ROI region image in the first data format is carried in an image frame in the second data format and transmitted to the server.
[0069] Exemplarily, in order to improve data transmission efficiency, the image information of the ROI area image in the first data format can be carried in an image frame in the second data format corresponding to the ROI area image in the first data format and transmitted to the server, that is, the ROI area image in the first data format and the corresponding image frame in the second data format are integrated, compressed and encoded, and transmitted to the server through the network.
[0070] Exemplarily, the image information of the ROI region image in the first data format is original data (data that has not been encoded) of the ROI region image in the first data format.
[0071] In one example, the image information of the ROI region image in the first data format is carried in an image frame in the second data format and transmitted to the server, which may include:
[0072] The image information of the ROI region image in the first data format is carried in a reserved field of a file header of an image frame in the second data format and transmitted to the server.
[0073] Exemplarily, in order to reduce information loss of the ROI area image in the first data format and avoid the impact of the transmission of the ROI area image in the first data format on the display of the image frame in the second data format, when the IPC intercepts the ROI area image in the first data format, the image information of the ROI area image in the first data format can be copied to the reserved field of the file header of the image frame in the second data format, and transmitted to the server through the network. Thus, the ROI area image in the first data format can be transmitted to the server without encoding and compressing the ROI area image in the first data format, thereby minimizing information loss during transmission, and carrying the image information of the ROI area image in the first data format through the reserved field of the file header of the image frame in the second data format will not affect the normal display of the image frame in the second data format.
[0074] When the server receives an image frame in the second data format, it can parse the header file of the image frame in the second data format, obtain the image information of the ROI area image in the first data format carried in the reserved field of the header file, obtain the ROI area image in the first data format, and perform enhancement processing based on the ROI area image in the first data format, thereby improving the effect of the enhancement processing.
[0075] It should be noted that, in an embodiment of the present application, the IPC may also separately compress and encode the ROI area image in the first data format and transmit it to the server, that is, transmit the ROI area image in the first data format and its corresponding image frame in the second data format to the server respectively; or, after the IPC acquires the image frame in the first data format, it does not intercept the ROI area, but directly transmits the image frame in the first data format and the image frame in the second data format obtained by processing the image frame in the first data format to the server, that is, transmits the entire image frame in the first data format to the server, and the server performs image enhancement based on the entire image frame in the first data format. The specific implementation thereof will not be elaborated here.
[0076] In addition, in an embodiment of the present application, if there are multiple different targets in a frame image, ROI area images in the first data format can be captured for the multiple different targets respectively, and the ROI area images in the first data format can be transmitted to the server in the manner described above.
[0077] Exemplarily, multiple ROI area images in the first data format corresponding to multiple targets in the same frame of image may be carried in the same frame of image in the second data format and transmitted to the server.
[0078] In one example, in order to improve the security of data transmission, the ROI area image in the first data format transmitted by the IPC to the server can be an encrypted ROI area image in the first data format, and its specific encryption rules can be determined by negotiation between the IPC and the server, or pre-configured in the IPC and the server.
[0079] Exemplarily, the encrypted image information of the ROI region image in the first data format may be carried in a reserved field of a file header of an image frame in the second data format and transmitted to the server.
[0080] It can be seen that in Figure 1 In the method flow shown, an ROI area image in a first data format is intercepted from an image frame in a first data format acquired by an IPC, and the ROI area image in the first data format is transmitted to a server, and the server performs image augmentation based on the ROI area image in the first data format. Compared with an image in a second data format with a bit width cropped, the image in the first data format not only has a high bit width, but is also not affected by image processing, encoding and decoding processing, etc. on the original information, which is beneficial to improving the effect of image enhancement processing and the quality of the image output after image enhancement processing. In addition, since the image in the first data format is transmitted to the server for enhancement processing, the image enhancement processing process can be performed on a server with stronger computing power, so that an enhancement algorithm with higher complexity and better effect can be used, further improving the effect of image enhancement. Furthermore, since only the ROI area image in the first data format is transmitted, compared with the implementation method of transmitting the entire image frame in the first data format, the transmission pressure is reduced and the feasibility is improved.
[0081] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, the technical solutions provided by the embodiments of the present application are described below in conjunction with specific application scenarios.
[0082] See also Figure 2 , is a structural diagram of a specific application scenario provided by an embodiment of the present application, such as Figure 2 As shown, in this application scenario, the image processing system may include a front-end camera and a server (taking the server as an example).
[0083] Exemplarily, the front-end camera may include an image acquisition module, a first processing module, a second processing module, a ROI region interception module and a third processing module.
[0084] The server may include a fourth processing module, a fifth processing module, and a sixth processing module.
[0085] The image processing flow of this application is described below in combination with the functions of each module.
[0086] 1. Front-end camera
[0087] 1. Image acquisition module
[0088] The image acquisition module is used for acquiring image data in a first data format and buffering the acquired image data in the first data format.
[0089] 2. First processing module
[0090] The first processing module is used for processing the image in the first data format into an image in the second data format.
[0091] In one example, if Figure 3A As shown, the first processing module may include a white balance correction unit, a color interpolation unit, and a curve mapping unit.
[0092] Exemplarily, the white balance correction unit is used to perform white balance correction processing on the image in the first data format to remove the image color cast caused by the influence of ambient light when the image is formed, so as to restore the original color information of the image, which is generally calculated by the gain coefficient R gain , G gain , B gain To adjust the corresponding R, G, B components:
[0093] R′=R*R gain
[0094] G′=G*G gain
[0095] B′=B*B gain
[0096] Among them, R, G, B are the first data format image (IMG in ) of the red, green, and blue color components, R', G', and B' are the output images of the white balance correction unit (IMG awb )’s color component.
[0097] The color interpolation unit is used to convert a single-channel image into an RGB three-channel image.
[0098] Taking the nearest neighbor interpolation method as an example, for a single-channel image (such as IMG awb ) directly fills the pixels with the corresponding missing colors with the nearest color pixels, so that each pixel contains three color components of RGB. The specific interpolation process can be as follows Figure 3B As shown, the interpolated image IMG cfa .
[0099] The curve mapping unit is used to perform curve mapping processing on the image output by the color interpolation unit to enhance the brightness and contrast of the image. Common curve mapping processing methods include gamma curve mapping, that is, linear mapping of the image according to the gamma table to convert the color interpolated image into a second data format image.
[0100] 2. Second processing module
[0101] The second processing module is used to detect the target of interest, and also locate the target after detecting the target, and output the target position information after the positioning is completed.
[0102] Exemplarily, common targets of interest include but are not limited to pedestrians, vehicles, animals, or license plates.
[0103] In one example, the second processing module can be implemented by a neural network to directly output the target coordinates. Figure 3C As shown, the neural network used to implement the first sub-processing unit may include a convolutional layer (Conv layer), a pooling layer (Pool layer), a fully connected layer (FC layer) and a bounding box regression (BBR).
[0104] For example, the operation of the convolutional layer can be expressed as follows:
[0105] YC i (I) = g(W i *YC i-1 (I)+B i )
[0106] Among them, YC i (I) is the output of the current convolutional layer, YC i-1 (I) is the input of the current convolutional layer, * indicates the convolution operation, W i and B i are the weight coefficient and offset coefficient of the convolution filter of the current convolution layer respectively. g() represents the activation function. When the activation function is ReLU, g(x)=max(0,x).
[0107] The pooling layer is a special downsampling layer, which reduces the feature map obtained by convolution, and the size of the reduced window is N×N. When the maximum pooling is used, the maximum value of the N×N window is taken as the value of the corresponding point of the latest image. The specific formula is as follows:
[0108] YP j (I) = maxpool(YP j-1 (I))
[0109] Among them, YC i (I) is the input of the jth pooling layer, YP j(I) is the output of the jth pooling layer.
[0110] The fully connected layer FC can be regarded as a convolutional layer with a filter window of 1×1. The specific implementation is similar to convolution filtering, and the expression is as follows:
[0111]
[0112] Among them, F kI (I) is the input of the kth fully connected layer, YF k (I) is the output of the kth fully connected layer, R and C are F kI (I) width and height, W ij and B ij They are the connection weight and bias of the fully connected layer respectively, and g() represents the activation function.
[0113] Bounding box regression (BBR) is to find a relationship so that the window P output by the fully connected layer can be mapped to a window G′ that is closer to the real window G. The implementation of regression is generally to translate or scale the window P.
[0114] Assuming that the coordinates of the window P output by the fully connected layer are (x1, x2, y1, y2), the coordinates of the transformed window are (x3, x4, y3, y4). If the transformation is a translation transformation, the translation scale is (Δx, Δy), and the coordinate relationship before and after the translation is:
[0115] x3=x1+Δx
[0116] x4=x2+Δx
[0117] y3=y1+Δy
[0118] y4=y2+Δy
[0119] If the transformation is a scaling transformation, the scaling scales in the X and Y directions are dx and dy respectively, and the coordinate relationship before and after the transformation is:
[0120] x4-x3=(x2-x1)*dx
[0121] y4-y3=(y2-y1)*dy
[0122] 3. ROI area capture module
[0123] According to the target position information output by the second processing module, the ROI area image in the first data format is intercepted from the cached image in the first data format.
[0124] In one example, it is assumed that the target position information output by the second processing module is [x, y, h, w], where x and y are the starting point coordinates of the detection frame, h and w are the height and width of the detection frame, and the first data format image is fus raw To represent, the intercepted ROI area image fus_t of the first data format raw for:
[0125] fus_t raw =fus raw (y+1∶y+h,x+1∶x+w)
[0126] 4. The third processing module
[0127] The third processing module is used to integrate the information of the image in the first data format and the image in the second data format, and output the information to the transmission module for network transmission.
[0128] In one example, assuming that the second data format is JPEG, for any frame of an image in the first data format, the third processing module can parse the header file information of the image frame in the JPEG format corresponding to the image frame in the first data format, find the APPn field memory of the JPEG format image, and copy the image information of the ROI area image in the first data format captured from the image in the first data format to the field.
[0129] Exemplarily, before copying, the image information of the ROI region image in the first data format may be encrypted.
[0130] For example, all pixels of the ROI area image in the first data format may be randomly shuffled, and the position information map of each point before shuffling may be saved. Then, the position information map and the shuffled ROI area image in the first data format may be copied to the APPn field (the front-end camera may negotiate with the server in advance the meaning of the content copied in the APPn field).
[0131] 2. Server
[0132] 1. The fourth processing module
[0133] The fourth processing module is used to parse the image frame in the second data format received by the server to obtain the ROI area image in the first data format contained therein.
[0134] In one example, still taking the JPEG format as an example, the fourth processing module first parses the header file information of the JPEG image, finds the APPn field memory, and copies the data in the APPn field memory.
[0135] Exemplarily, if the third processing module transmits the encrypted image information of the ROI region image in the first data format, the fourth processing module needs to decrypt the data when copying the data in the APPn field memory.
[0136] For example, taking the above-mentioned encryption method as an example, the fourth processing module can obtain a position information map from the data in the copied APPn memory field to determine the original position information of each pixel point before the ROI area image in the first data format is scrambled, and based on the original position information, restore the scrambled data to the original data.
[0137] 2. Fifth processing module
[0138] The fifth processing module is used to perform enhancement processing on the acquired ROI area image in the first data format, and convert it into a high-quality ROI area image in the second data format for subsequent display and / or intelligent recognition.
[0139] Exemplarily, the operation of enhancement processing (which may be referred to as enhancement operation) may include but is not limited to one or more operations such as de-mosaicing, denoising, deblurring, dehazing, resolution improvement, brightness adjustment, color restoration, contrast enhancement, dynamic range enhancement, and clarity enhancement.
[0140] In one example, if Figure 3D As shown, the fifth processing module may include a correction processing unit and an image enhancement processing unit.
[0141] Exemplarily, the correction processing unit may perform one or more of the following processing on the ROI region image in the first data format:
[0142] 1) Sensor calibration: During the production process, sensors may have certain physical defects due to process limitations, which may lead to problems such as black level, bad pixels, fixed pattern noise, G1 / G2 green channel imbalance, etc. during sensor imaging. Sensor calibration processing can correct one or more of the above imaging problems, so that the ROI area image in the corrected first data format can eliminate imaging problems of different sensor production processes, eliminate equipment correlation, and allow subsequent convolutional neural networks to adapt to different types of sensors.
[0143] 1.1. The above black spot flat correction method may include:
[0144] out=in–blackVal
[0145] Where out is the black level correction result, in is the input image, blackVal is the black level value of the sensor, and different models of sensors have different black level values.
[0146] 1.2. The above bad pixel correction method may include: median filtering
[0147] 1.3. The above-mentioned fixed pattern noise correction method may include: manually calibrating the fixed pattern noise position, and replacing the noise pixel with the interpolated value of the surrounding pixels at the position.
[0148] 1.4. The above green channel imbalance correction method may include: G channel mean filtering.
[0149] 2) White balance correction: please refer to the relevant implementation of white balance correction in the first processing module.
[0150] 3. Sixth processing unit
[0151] The sixth processing unit is used to perform target recognition on the ROI area image in the second data format obtained after the enhancement processing by the fifth processing unit.
[0152] In one example, if Figure 3E As shown, the sixth processing unit may include a target feature vector extraction unit and a feature vector comparison unit.
[0153] Exemplarily, the target feature vector extraction unit can be implemented using a DeepID network to output a 160-dimensional target feature vector.
[0154] The feature vector comparison unit can calculate the Euclidean distance between the target feature vector and the registered standard feature vector, compare and judge with the set threshold, and perform target recognition.
[0155] In an embodiment of the present application, image frames in a first data format are collected and cached, the image frames in the first data format are processed to obtain image frames in a second data format, and target detection is performed on the image frames in the second data format to determine target position information in the image frames in the second data format; then, ROI area capture is performed on the cached image frames in the first data format based on the target position information to obtain an ROI area image in the first data format, and the ROI area image in the first data format is transmitted to a server, so that the server performs enhancement processing on the ROI area image in the first data format to obtain an ROI area image in the second data format, thereby improving the effect of image enhancement processing.
[0156] The method provided by the present application is described above. The device provided by the present application is described below:
[0157] See also Figure 4 , is a schematic diagram of the structure of an image processing device provided in an embodiment of the present application, such as Figure 4 As shown, the image processing device may include:
[0158] The acquisition unit 410 is used to acquire image frames in a first data format; the first data format is the original data format after the image sensor converts the captured light source signal into a digital signal;
[0159] A cache unit 420, configured to cache image frames in the first data format;
[0160] The processing unit 430 is used to process the image frame in the first data format to obtain an image frame in a second data format; the second data format is an image format suitable for display or transmission;
[0161] A detection unit 440, configured to perform target detection on the image frame in the second data format to determine target position information in the image frame in the second data format;
[0162] A capture unit 450 is configured to capture a region of interest (ROI) on the cached image frame in the first data format based on the target position information, so as to obtain an ROI region image in the first data format;
[0163] The transmission unit 460 is used to transmit the ROI region image in the first data format to the server, so that the server performs enhancement processing on the ROI region image in the first data format to obtain the ROI region image in the second data format.
[0164] In an optional implementation, the transmission unit 460 is specifically configured to carry the image information of the ROI region image in the first data format in an image frame in the second data format and transmit it to the server.
[0165] In an optional implementation, the transmission unit 460 is specifically configured to transmit the image information of the ROI region image in the first data format to the server by carrying the image information in the reserved field of the file header of the image frame in the second data format.
[0166] In an optional implementation, the transmission unit 460 is specifically configured to transmit the encrypted image information of the ROI region image in the first data format to the server by carrying it in a reserved field of a file header of an image frame in the second data format.
[0167] In an optional implementation, the processing unit 430 is specifically configured to perform a preset operation on the image frame in the first data format to obtain an image frame in a second data format;
[0168] The preset operation process includes one or more of the following:
[0169] White balance correction, color interpolation, curve mapping.
[0170] See also Figure 5 , is a schematic diagram of the hardware structure of an image processing device provided in an embodiment of the present application. The image processing device may include a processor 501 and a machine-readable storage medium 502 storing machine-executable instructions. The processor 501 and the machine-readable storage medium 502 may communicate via a system bus 503. Furthermore, by reading and executing the machine-executable instructions corresponding to the image processing logic in the machine-readable storage medium 502, the processor 501 may execute the image processing method described above.
[0171] The machine-readable storage medium 502 mentioned herein may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof.
[0172] The present application also provides a machine-readable storage medium including machine-executable instructions, such as Figure 5 The machine-readable storage medium 502 in the image processing apparatus may be executed by a processor 501 in the image processing apparatus to implement the image processing method described above.
[0173] See also Figure 6 , is a schematic diagram of the structure of an image processing system provided in an embodiment of the present application, such as Figure 6 As shown, the image processing system may include: a video surveillance front-end device 610 and a server 620; wherein:
[0174] The video surveillance front-end device 610 is used to collect and cache image frames in a first data format; the first data format is a spectral band sensing data format; the image frames in the first data format are processed to obtain image frames in a second data format; the second data format is an image format suitable for display or transmission; target detection is performed on the image frames in the second data format to determine the target position information in the image frames in the second data format; based on the target position information, a region of interest (ROI) is intercepted on the cached image frames in the first data format to obtain an ROI region image in the first data format; and the ROI region image in the first data format is transmitted to the server;
[0175] The server 620 is used to perform enhancement processing on the ROI region image in the first data format to obtain the ROI region image in the second data format.
[0176] In an optional implementation, the server 620 is specifically configured to perform a preset enhancement operation on the ROI region image in the first data format;
[0177] The preset enhancement operation includes one or more of the following:
[0178] De-mosaicing, denoising, deblurring, dehazing, resolution enhancement, brightness adjustment, color restoration, contrast enhancement, dynamic range enhancement, and clarity enhancement.
[0179] In an optional implementation manner, the server 620 is further configured to, if the image information of the ROI region image in the first data format is encrypted image information of the ROI region image in the first data format, decrypt the image information of the first ROI region image according to a preset encryption rule to obtain the first ROI region image;
[0180] The server 620 is specifically configured to perform enhancement processing on the first ROI region image.
[0181] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0182] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. An image processing method, characterized in that: Applied to a video surveillance front-end device, the method comprises: Collecting and caching image frames in a first data format; the first data format is the original data format after the image sensor converts the captured light source signal into a digital signal, and the original data is sensing data from one or more spectral bands; Processing the image frame in the first data format to obtain an image frame in a second data format; the second data format is an image format suitable for display or transmission; wherein the first data format is a RAW format and the second data format is a JPEG format; Performing target detection on the image frame in the second data format to determine target position information in the image frame in the second data format; Based on the target position information, performing region of interest (ROI) region interception on the cached image frame in the first data format to obtain an ROI region image in the first data format; Transmitting the ROI region image in the first data format to a server, so that the server performs enhancement processing on the ROI region image in the first data format to obtain the ROI region image in a second data format; The step of transmitting the ROI area image in the first data format to the server includes: The image information of the ROI area image in the first data format is carried in a reserved field of the file header of the image frame in the second data format and transmitted to the server. The reserved field of the file header of the image frame in the second data format is a field for storing header file information, so that the server parses the header file information of the JPEG image, obtains the ROI area image in the first data format from the field for storing header file information, performs enhancement processing on the obtained ROI area image in the first data format, converts it into a high-quality ROI area image in the second data format, and performs target recognition on the ROI area image in the second data format obtained after the enhancement processing; the enhancement processing includes sensor calibration and white balance calibration.
2. The method according to claim 1, characterized in that The step of carrying the image information of the ROI region image in the first data format in a reserved field of a file header of an image frame in the second data format and transmitting the image information to the server includes: The encrypted image information of the ROI region image in the first data format is carried in a reserved field of a file header of an image frame in the second data format and transmitted to the server.
3. The method according to claim 1, characterized in that The processing of the image frame in the first data format includes: Performing a preset operation process on the image frame in the first data format; The preset operation process includes one or more of the following: White balance correction, color interpolation, curve mapping.
4. An image processing device, characterized in that: Applied to video surveillance front-end equipment, the device comprises: An acquisition unit, configured to acquire image frames in a first data format; the first data format is a raw data format after the image sensor converts the captured light source signal into a digital signal, and the raw data is sensing data from one or more spectral bands; A cache unit, used for caching image frames in the first data format; A processing unit, configured to process the image frame in the first data format to obtain an image frame in a second data format; the second data format is an image format suitable for display or transmission; wherein the first data format is a RAW format and the second data format is a JPEG format; a detection unit, configured to perform target detection on the image frame in the second data format to determine target position information in the image frame in the second data format; A capture unit, configured to perform region of interest (ROI) region capture on the cached image frame in the first data format based on the target position information, so as to obtain a ROI region image in the first data format; A transmission unit, used for transmitting the ROI region image in the first data format to a server, so that the server performs enhancement processing on the ROI region image in the first data format to obtain the ROI region image in a second data format; Wherein, the transmission unit is specifically used to carry the image information of the ROI area image in the first data format in the reserved field of the file header of the image frame in the second data format and transmit it to the server, and the reserved field of the file header of the image frame in the second data format is the field for storing header file information of the JPEG format image, so that the server parses the header file information of the JPEG image, obtains the ROI area image in the first data format from the field for storing header file information, performs enhancement processing on the obtained ROI area image in the first data format, converts it into a high-quality ROI area image in the second data format, and performs target recognition on the ROI area image in the second data format obtained after the enhancement processing; the enhancement processing includes sensor calibration and white balance calibration.
5. The device according to claim 4, characterized in that The transmission unit is specifically used to transmit the encrypted image information of the ROI area image in the first data format to the server by carrying it in the reserved field of the file header of the image frame in the second data format.
6. The device according to claim 4, characterized in that The processing unit is specifically configured to perform a preset operation on the image frame in the first data format to obtain an image frame in a second data format; The preset operation process includes one or more of the following: White balance correction, color interpolation, curve mapping.
7. An image processing system, characterized in that: include: Video surveillance front-end equipment and servers; including: The video surveillance front-end device is used to collect and cache image frames in a first data format; the first data format is the original data format after the image sensor converts the captured light source signal into a digital signal, and the original data is the sensing data from one or more spectral bands; the image frames in the first data format are processed to obtain image frames in a second data format; the second data format is an image format suitable for display or transmission; target detection is performed on the image frames in the second data format to determine the target position information in the image frames in the second data format; based on the target position information, the cached image frames in the first data format are intercepted into a region of interest (ROI) to obtain an ROI region image in the first data format; the ROI region image in the first data format is transmitted to a server; wherein the first data format is a RAW format and the second data format is a JPEG format; The server is used to perform enhancement processing on the ROI area image in the first data format to obtain the ROI area image in the second data format; The video surveillance front-end device is specifically used to carry the image information of the ROI area image in the first data format in the reserved field of the file header of the image frame in the second data format and transmit it to the server, and the reserved field of the file header of the image frame in the second data format is a field for storing header file information of a JPEG format image; The server is specifically used to parse the header file information of the JPEG image, obtain the ROI area image in the first data format from the field used to store the header file information, perform enhancement processing on the obtained ROI area image in the first data format, convert it into a high-quality ROI area image in the second data format, and perform target recognition on the ROI area image in the second data format obtained after the enhancement processing; the enhancement processing includes sensor calibration and white balance calibration.
8. The system according to claim 7, characterized in that The server is specifically configured to perform a preset enhancement operation on the ROI region image in the first data format; The preset enhancement operation includes one or more of the following: De-mosaicing, denoising, deblurring, dehazing, resolution enhancement, brightness adjustment, color restoration, contrast enhancement, dynamic range enhancement, and clarity enhancement.
9. The system according to claim 7, characterized in that The server is further configured to, if the image information of the ROI area image in the first data format is encrypted image information of the ROI area image in the first data format, decrypt the image information of the first ROI area image according to a preset encryption rule to obtain the first ROI area image; The server is specifically configured to perform enhancement processing on the first ROI area image.
