A method and device for image processing based on a driving recorder

By monitoring the real-time image writing speed and actual bit rate of the dashcam, and dynamically adjusting the quantization parameters and bit rate threshold, the problems of mosaic and license plate blurring in complex scenarios of dashcams are solved, realizing flexible adjustment of image clarity and clear recognition of license plates.

CN117079368BActive Publication Date: 2025-11-1870MAI CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311148819.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-06
Publication Date
2025-11-18
Estimated Expiration
2043-09-06

AI Technical Summary

Technical Problem

Dashcams are prone to pixelation and blurry license plates in complex scenarios, and current technologies cannot effectively solve these problems by simply increasing the bitrate or sacrificing image quality.

Method used

By monitoring the speed at which the dashcam's real-time images are written to the memory card, the actual bitrate is calculated. Based on the actual bitrate and preset thresholds, the quantization parameters and bitrate thresholds of the images are dynamically adjusted to achieve flexible processing in different scenarios and ensure the clarity of license plates.

Benefits of technology

It effectively avoids mosaic and blurring phenomena in different scenarios, enables flexible adjustment of image clarity, and ensures that license plates can be clearly recognized even in complex scenarios, avoiding the pressure brought by simply increasing the bit rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117079368B_ABST
    Figure CN117079368B_ABST
Patent Text Reader

Abstract

The application aims to provide a driving recorder-based image processing method and device. The application monitors the writing speed of real-time images of a driving recorder to a storage card. If the writing speed is less than a preset writing speed threshold, the actual code rate of the storage card is calculated. If the actual code rate is greater than a preset code rate threshold, the maximum quantization parameter value of the real-time images is increased. If the actual code rate is equal to the preset code rate threshold, the preset code rate threshold is reduced. Different parameters are adjusted according to the actual code rate of the storage card. Different processing forms are realized in different scenes. Compared with blindly adjusting the overall code rate or losing image quality, the application is more flexible and convenient, and effectively realizes the clear effect of a license plate region in a complex scene.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of driving recorders, and in particular to an image processing method and device based on a driving recorder. BACKGROUND

[0002] A driving recorder is a device for recording images and sounds related information during vehicle driving. It can not only provide support for evidence collection of traffic accidents, but also record beautiful scenes during driving for people who like self-driving tours.

[0003] However, during vehicle driving, the driving scene is complex and variable, and the image obtained by the driving recorder is also constantly adjusted to meet the scene requirements. In the prior art, when facing a scene with complex leaves or messy streets, a serious mosaic phenomenon occurs. At this time, if the code rate is simply increased, it will bring great pressure to the write card rate and the memory bandwidth. SUMMARY

[0004] An object of the present application is to provide an image processing method and device based on a driving recorder, which solves the problem of serious mosaic and blurred license plates in complex scenes of the driving recorder. The relationship between the actual code rate and the preset code rate threshold in the driving recorder is used to adjust the image write card parameters, so that the storage card can normally write data while the image definition is adjusted, and the license plate can be clearly seen in multiple scenes.

[0005] According to one aspect of the present application, an image processing method based on a driving recorder is provided, wherein the method comprises:

[0006] monitoring the write speed of real-time images of the driving recorder written to a storage card;

[0007] if the write speed is less than a preset write speed threshold, calculating the actual code rate of the storage card;

[0008] if the actual code rate is greater than a preset code rate threshold, increasing the maximum quantization parameter value of the real-time image;

[0009] if the actual code rate is equal to the preset code rate threshold, reducing the preset code rate threshold.

[0010] Further, in the above method, the quantization interval of the real-time image is fixed, and there is a minimum quantization parameter value and a maximum quantization parameter value.

[0011] Further, in the above method, the image processing method based on the driving recorder further comprises:

[0012] Taking a hood of a vehicle in the real-time image obtained by the driving recorder as a middle axis, extending to both sides of the middle axis, regionally dividing the real-time image to obtain at least two quantization regions;

[0013] Setting a quantization parameter value of a quantization region where the middle axis is located as the minimum quantization parameter value;

[0014] Taking the quantization region where the middle axis is located as a reference, gradually increasing the quantization parameter value of the quantization regions sequentially extended to both sides until the maximum quantization parameter value.

[0015] Further, in the above method, the gradually increasing form is in an equal ratio.

[0016] Further, in the above method, the image processing method based on the driving recorder further comprises:

[0017] Setting the preset writing speed threshold, the preset code rate threshold and the quantization interval by an encoder in the driving recorder.

[0018] According to another aspect of the present application, a non-volatile storage medium having computer readable instructions stored thereon is also provided, the computer readable instructions being executable by a processor to cause the processor to implement an image processing method based on a driving recorder as described above.

[0019] According to another aspect of the present application, an image processing device based on a driving recorder is also provided, wherein the device comprises:

[0020] One or more processors;

[0021] A computer readable medium for storing one or more computer readable instructions,

[0022] When the one or more computer readable instructions are executed by the one or more processors, the one or more processors implement an image processing method based on a driving recorder as described above.

[0023] Compared with the prior art, the present application monitors the writing speed of real-time images of a driving recorder to a storage card; if the writing speed is less than a preset writing speed threshold, the actual code rate of the storage card is calculated; if the actual code rate is greater than a preset code rate threshold, the maximum quantization parameter value of the real-time image is increased; and if the actual code rate is equal to the preset code rate threshold, the preset code rate threshold is reduced. Not only does this realize different writing card parameter processing forms in different scenes, but it is also more flexible and convenient than blindly adjusting the overall code rate or losing image quality, and effectively realizes effective writing of images in any scene and avoids serious image mosaic and blurring in complex scenes. BRIEF DESCRIPTION OF DRAWINGS

[0024] Other features, objects, and advantages of the application will become more apparent from the following detailed description when read in connection with the following drawings:

[0025] Figure 1 Fig. 1 shows a flow diagram of a method for image processing based on a vehicle event data recorder according to an aspect of the present application;

[0026] Figure 2 Fig. 2 shows a diagram of quantization region division of a leafy street in actual application of the method for image processing based on a vehicle event data recorder according to an aspect of the present application;

[0027] Figure 3 Fig. 3 shows a diagram of quantization interval and distribution of quantization parameter value corresponding to each quantization interval in actual application of the method for image processing based on a vehicle event data recorder according to an aspect of the present application.

[0028] The same or similar reference numerals in the drawings denote the same or similar components. DETAILED DESCRIPTION

[0029] The application will be further described in connection with the drawings.

[0030] In one typical configuration of the present application, the terminal, the device of the service network and the trusted party each include one or more processors (CPU), input / output interface, network interface and memory.

[0031] The memory can include non-permanent memory in the computer readable medium, random access memory (RAM) and / or non-volatile memory such as read only memory (ROM) or flash memory (flash RAM). The memory is an example of the computer readable medium.

[0032] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape disk storage or other magnetic storage device, or any other non-transmission medium that can be used to store information accessible by a computing device. According to the definition herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carriers.

[0033] As shown in the flowchart of the image processing method based on the driving recorder according to an aspect of the present application, the method comprises steps S11, S12, S13 and S14, and specifically comprises the following steps: Figure 1

[0034] Step S11, monitoring the writing speed of real-time images of the driving recorder to the storage card; here, the storage card includes but is not limited to SD storage card and other storage cards used in driving recorders. In a preferred embodiment of the present application, the storage card is preferably an SD storage card. The writing speed refers to the speed of writing image-related data stream in the storage card, and the corresponding unit includes but is not limited to frame / s.

[0035] In this embodiment, after step S11 and before step S12, according to the writing speed of real-time images of the driving recorder to the storage card obtained by monitoring, the size relationship between the monitored writing speed and the preset writing speed threshold is judged, and in the actual application scene, the storage card with a writing speed less than the preset writing speed threshold is called a low-speed storage card, that is, the phenomenon of slow writing of image-related data stream in the low-speed storage card / video cache gradually increasing, resulting in that the image-related data stream cannot be written into the low-speed storage card in time.

[0036] ​Step S12, if the write speed is less than a preset write speed threshold, calculate the actual code rate of the memory card; here, the preset write speed threshold refers to the write speed threshold of the image-related data stream set in the encoder of the vehicle-mounted camera when writing the image-related data stream to the memory card, so that the image-related data stream is written according to the set write speed threshold; the code rate refers to the speed of the compressed image size per unit time when writing the image-related data stream, and the corresponding unit of the code rate includes but is not limited to mb / s, GB / s, etc.

[0037] Step S13, if the actual code rate is greater than a preset code rate threshold, increase the maximum quantization parameter value of the real-time image.

[0038] Here, the preset code rate threshold refers to the compressed image-related data stream speed threshold set in the encoder of the vehicle-mounted camera when writing the image-related data stream to the memory card, so that the image-related data stream is written according to the set write code rate threshold; quantization refers to the process of approximating the continuous value (or a large number of possible discrete values) of the signal to a finite number (or fewer) of discrete values, and the quantization interval is also set in the encoder of the vehicle-mounted camera, which is composed of a maximum quantization parameter value and a minimum quantization parameter value, wherein the maximum quantization parameter value refers to the maximum value of the image quantization when the real-time image is written to the memory card, and the minimum quantization parameter value refers to the minimum value of the image quantization when the real-time image is written to the memory card; it should be noted that when writing the image-related data stream, the memory card compresses the image-related data stream, and different quantization values are determined according to different images, that is, when compressing the image-related data stream, the corresponding quantization value is selected in the quantization interval, thereby completing the compression and card writing of the image-related data stream.

[0039] In actual application scenarios, the quantization value of the image is inversely proportional to the definition of the image, that is, the lower the quantization value, the higher the definition of the image; when the actual code rate is greater than the preset code rate threshold, it indicates that the vehicle-mounted camera is in a complex scene, and the maximum quantization parameter value is reached when writing the image, at this time, the maximum quantization parameter value is increased to reduce the image quality, so that the low-speed card can be used in complex scenes by sacrificing the image quality to complete the writing of the image-related data stream.

[0040] Step S14, if the actual code rate is equal to the preset code rate threshold, reduce the preset code rate threshold, reduce the overall code rate of the written image-related data stream, and promote the normal operation of the low-speed memory card.

[0041] In this embodiment, after step S14, the write parameters of the memory card will be adjusted in real time to modify the write parameters of the memory card ...

[0042] Through steps S11 to S14 above, based on real-time monitoring of the memory card's write speed, when the memory card's write speed is less than the preset write speed threshold, the actual bit rate of the memory card is calculated, and different write parameters are adjusted according to different actual bit rates. This achieves dynamic adjustment of quantization parameter values ​​and preset bit rate thresholds when writing images to a low-speed memory card, satisfying the need for flexible processing of image-related data streams while regularly allocating image clarity, so that the dashcam can operate normally and produce clear images in any scenario.

[0043] In a preferred embodiment of this application, the preset write speed threshold is preferably 30 frames / second, the preset bitrate threshold is 3mb / s, and the quantization interval is [minqp, maxqp]. The real-time image from the dashcam A is monitored to be written to the SD memory card a at a write speed of 20 frames / second. Since the write speed of SD memory card a (20 frames / second) is less than the preset write speed threshold (30 frames / second), SD memory card a is considered a low-speed memory card. The actual bitrate of SD memory card a is calculated. If the actual bitrate of SD memory card a is 4mb / s (i.e., the actual bitrate is greater than the preset bitrate threshold), the maxqp (maximum quantization parameter value) of the real-time image is increased. If the actual bitrate of SD memory card a is 3mb / s (i.e., the actual bitrate is equal to the preset bitrate threshold), the 3mb / s (preset bitrate threshold) is decreased. This allows the low-speed memory card (SD memory card a) to modify the write speed of different regions of the real-time image based on the adjustments to the write parameters.

[0044] Continuing with the above embodiments of this application, the quantization range of the real-time image is fixed, and there exists a minimum quantization parameter value and a maximum quantization parameter value. Here, based on the calculation of the real-time bitrate, when the maximum quantization parameter value of the real-time image is increased, since the quantization range of the real-time image is fixed, the minimum quantization parameter value will also be adjusted. Furthermore, the specific increase in the quantization offset value is determined according to the actual scenario, thereby achieving dynamic adjustment of the quantization range and preventing the quantization range from becoming too large due to infinite quantization adjustments, which could result in abrupt image changes.

[0045] In a preferred embodiment of this application, the preferred quantization interval is [minqp, maxqp], where there is a 10-unit offset between maxqp and minqp. If the actual bitrate is greater than a preset bitrate threshold, the maximum quantization parameter value of the real-time image is preferably increased by 2 units, and the minimum quantization parameter value of the real-time image will be increased by 2 units to ensure that there are 10-unit pairs of quantization offset values ​​between the enlarged quantization interval [minqp`, maxqp`].

[0046] Another aspect of this application provides an image processing method based on a dashcam, which also includes:

[0047] Using the car hood in the real-time image acquired by the dashcam as the central axis, the real-time image is divided into regions extending to both sides of the central axis to obtain at least two quantized regions. Here, the determination of the central axis will be based on different vehicles, and in actual application scenarios, the central axis will also correspond to a certain area in the real-time image. That is, the central axis is not the line segment where the car hood is located, but an area with a certain width. Determining the car hood in the real-time image as the central axis ensures that the license plate information during the driving process is included within the central axis of the image written by the dashcam.

[0048] The quantization parameter value of the quantization area where the centerline is located is set to the minimum quantization parameter value so that the quantization parameter value at the quantization area where the centerline is located is minimized, thereby ensuring the highest clarity within the quantization area of ​​the centerline and achieving the clearest license plate captured by the dashcam.

[0049] Using the quantization region where the central axis is located as a reference, the quantization parameter values ​​are gradually increased for the quantization regions extending sequentially on both sides until the maximum quantization parameter value is reached. It should be noted that the gradual increase is in a proportional manner. Of course, the parameter increase can also be uniform or non-uniform according to other methods.

[0050] In a preferred embodiment of this application, such as Figure 2The diagram illustrates the quantization region division of a foliage-strewn street in a practical application of an image processing method based on a dashcam, representing one aspect of this application. The real-time image from dashcam A uses the car hood as the central axis, extending upwards and downwards to divide the image into regions I, II, and III. Region I is the car hood region, Region II is the upper part of the car hood, and Region III is the lower part of the car hood. A quantization interval [0, 6] is assigned, with the quantization parameter value of Region I being 0 (i.e., the minimum quantization parameter value). Region I is then used as the base... The quantization parameter values ​​for regions II and III are gradually increased. The preferred quantization interval has an offset of 10 units, with region II having an offset of 6 units (1, 2, 3, 4, 5, 6) and region III having an offset of 3 units (1, 2, 3). These multi-level quantization parameter values ​​promote a uniform and smooth image. Furthermore, in this application, adjusting the maximum quantization parameter value allows for improved image quality in complex scenes or when there are many leaves above the image, even at the expense of the quality of the quantized area above, thus ensuring clear recognition of the license plate quantization area below.

[0051] Specifically, different quantization zones will be divided according to different street scenarios, and quantization parameters will be assigned to each quantization zone, such as... Figure 3 The diagram illustrates the quantization intervals and the distribution of quantization parameter values ​​corresponding to each quantization interval in a practical application of an image processing method based on a dashcam, according to one aspect of this application. The qp value (quantization parameter value) corresponding to region I is 24 (i.e.,...). Figure 3 The minimum quantization parameter value is used in the region I. The qp value for region II is 25-30, and the qp value is higher closer to the top edge of the image. Similarly, the qp value for region III is 25-28, and the qp value is higher closer to the bottom edge of the image. The qp value is the minimum in region I. In regions II and III, the qp value is higher closer to the top and bottom edges of the image, which makes the image sharpness in region I the highest.

[0052] Another aspect of this application provides an image processing method based on a dashcam, which also includes:

[0053] The preset write speed threshold, the preset bit rate threshold, and the quantization range are set through the encoder in the dashcam. Here, although a preset bit rate threshold (i.e., CBR constant bit rate) is set, a quantization range [minqp, maxqp] is also set so that the image clarity can be adjusted within the quantization range when the data stream is written to the memory card.

[0054] For example, after the dashcam collects image data, it transmits the image-related data stream to the encoder. The encoder receives the image-related data stream and writes it to the SD memory card. Before writing, the encoder sets a preset write speed threshold of 30 frames / second, a preset bitrate threshold of 3 megabits / second, and a quantization range of [15, 40]. The encoder monitors the write speed of the SD memory card in real time. If the write speed of the SD memory card is lower than 30 frames / second, the SD memory card is considered a low-speed card. The encoder calculates the actual bitrate of the low-speed card and determines the relationship between the actual bitrate and the preset bitrate threshold. If the actual bitrate is 3 megabits / second, then the actual bitrate equals the preset bitrate threshold, and the preset bitrate threshold in the encoder is lowered to allow the low-speed card to operate normally. If the actual bitrate is 4 megabits / second, then the actual bitrate is greater than the preset bitrate threshold, and the value is increased by 40, i.e., the maxqp is increased, sacrificing the image quality of some areas. The encoder and the corresponding quantization parameter values ​​of the image quantization area are dynamically adjusted to set different quantization parameter values ​​for different areas of the image, so that the license plate can be clearly seen in any scenario.

[0055] Compared to solutions on the market that simply adjust the bitrate, resulting in a loss of image quality, or even ignore the bitrate and only support high-speed cards, the embodiments of this application combine the real-time image of the dashcam to divide the area and set different quantization parameter values ​​for each quantization area. At a lower cost, this not only ensures that license plates can be clearly obtained in complex scenarios, but also brings a significant improvement in image quality compared to ordinary scenarios.

[0056] Meanwhile, dynamically adjusting the quantization range and the preset bitrate threshold also compensates for the fact that the constant bitrate set in the encoder cannot meet the image requirements in complex scenes, thus causing the problem that the same parameters cannot be used to adapt to all memory cards.

[0057] According to another aspect of this application, a non-volatile storage medium is also provided, on which computer-readable instructions are stored, which, when executed by a processor, cause the processor to implement the code data access method based on gateway forwarding as described above.

[0058] According to another aspect of this application, an image processing device based on a dashcam is also provided, wherein the device includes:

[0059] One or more processors;

[0060] Computer-readable medium for storing one or more computer-readable instructions.

[0061] When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the image processing method based on a dashcam as described above.

[0062] For details of the various embodiments of the image processing device based on a dashcam, please refer to the corresponding part of the above-described embodiment of the image processing method based on a dashcam, which will not be repeated here.

[0063] In summary, this application monitors the write speed of the dashcam's real-time images to the memory card; if the write speed is less than a preset write speed threshold, the actual bitrate of the memory card is calculated; if the actual bitrate is greater than the preset bitrate threshold, the maximum quantization parameter value of the real-time image is increased; if the actual bitrate is equal to the preset bitrate threshold, the preset bitrate threshold is decreased. By adjusting different parameters according to the actual bitrate of the memory card, different processing methods are achieved in different scenarios, which is more flexible and convenient than simply adjusting the overall bitrate or sacrificing image quality. It also effectively achieves a clear license plate area in complex scenarios.

[0064] It should be noted that this application can be implemented in software and / or a combination of software and hardware, for example, using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In one embodiment, the software program of this application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium, such as RAM memory, magnetic or optical drives, floppy disks, and similar devices. Furthermore, some steps or functions of this application can be implemented in hardware, for example, as circuitry that cooperates with a processor to perform the various steps or functions.

[0065] Furthermore, a portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. The program instructions invoking the methods of this application may be stored in a fixed or removable recording medium, and / or transmitted via data streams in broadcast or other signal carrying media, and / or stored in the working memory of a computer device operating according to the program instructions. Here, one embodiment of this application includes an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, the apparatus is triggered to operate the methods and / or technical solutions based on the foregoing embodiments of this application.

[0066] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in the apparatus claims may also be implemented by a single unit or device in software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.

Claims

1. An image processing method based on a dashcam, wherein, The method includes: The method monitors the writing speed of real-time images from a dashcam to a memory card. The quantization range of the real-time image is fixed, and there are minimum and maximum quantization parameter values. The real-time image is divided into regions using the hood of the car in the real-time image acquired by the dashcam as the central axis and extending to both sides of the central axis to obtain at least two quantization regions. The quantization parameter value of the quantization region where the central axis is located is set as the minimum quantization parameter value. Based on the quantization region where the central axis is located, the quantization parameter values ​​of the quantization regions extending sequentially to both sides are gradually increased until the maximum quantization parameter value is reached. If the write speed is less than the preset write speed threshold, then the actual bit rate of the memory card is calculated; If the actual bitrate is greater than the preset bitrate threshold, then the maximum quantization parameter value of the real-time image is increased. If the actual bitrate is equal to the preset bitrate threshold, then the preset bitrate threshold is reduced.

2. The method according to claim 1, wherein, The gradually increasing form increases in a geometric progression.

3. The method according to claim 1, wherein, The method further includes: The preset write speed threshold, the preset bit rate threshold, and the quantization range are set through the encoder in the dashcam.

4. A non-volatile storage medium having stored computer-readable instructions thereon, which, when executed by a processor, cause the processor to perform the method as described in any one of claims 1 to 3.

5. An image processing device based on a dashcam, wherein, The device includes: One or more processors; Computer-readable medium for storing one or more computer-readable instructions. When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors perform the method as claimed in claims 1 to 3.

Citation Information

Patent Citations

  • Code stream control method, network camera, electronic equipment and storage medium

    CN115695921A

  • System and method for dynamically adjusting a recording bitrate to accommodate a writing speed of a storage device

    US20170134730A1