This application is based on and claims priority to Korean Patent Application No. 10-2023-0135775 filed on Oct. 12, 2023 in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference.
The present disclosure relates to a digital image encoding method, and more specifically, to an image encoding method that adaptively applies a quantization coefficient.2.
As a surveillance and security system are becoming more widely used, the installation places of various image acquisition devices, including closed-circuit cameras which are core components of the surveillance and security system, are increasing exponentially. An increase in the number of the image acquisition devices, especially the installed cameras, may result in the expanded use of pan-tilt-zoom (PTZ) cameras, which lead to a reduction in blind spots, and thereby enhance the positive effects of crime prevention and accident prevention. On the other hand, a solution may also necessary for the problem of invasion of privacy caused by the inclusion of facial images of the general public.
As the installation places of cameras for surveillance and security systems increase and the performance of the cameras improves, the size of data for processing pictures acquired from the cameras also increases rapidly. However, as the storage and throughput of data increase, the cost associated with storage, transmission line maintenance, expansion of processing capability may undesirably increase.
Advancements in artificial intelligence including machine learning and (moving) picture processing technology are being introduced in the field of the surveillance and security system to address privacy infringement issues. For example, a solution may be utilized that applies a privacy mask (e.g., mosaic) only to a region within a frame where privacy protection is required, such as the face, in a picture acquired from the camera.
The present disclosure may reduce the cost associated with image encoding and, further, the utilization of an encoded digital image, by adaptively adjusting the size of a quantization coefficient applied to a privacy region within an image frame, in order to efficiently utilize a resource required for data transmission and processing in digital image encoding.
Technical objects to be achieved by the present disclosure are not limited to those described above, and other technical objects that are not mentioned above may also be clearly understood from the descriptions given below by those skilled in the art to which the present disclosure belongs.
Additional aspects will be set forth in part in the description which follows and, in part, will be apparent from the description, or may be learned by practice of the presented embodiments.
According to an aspect of the disclosure, provided is a method for encoding a digital image including a privacy region, the method may include: determining whether a change occurs in the privacy region within the digital image; and based on no change occurring in the privacy region within the digital image, encoding the privacy region in a skip mode, and based on the change occurring in the privacy region within the digital image, increasing a quantization coefficient (QP) of the privacy region.
The method may further include updating encoding information of the privacy region based on the increase of the QP of the privacy region.
Based on the change in the privacy region occurring within the digital image, the QP of the privacy region may be increased to a maximum value provided by an encoder.
The method may further include: determining whether a region of interest (ROI) is included in the digital image, prior to the determining whether the change occurs in the privacy region; and adjusting a QP of the ROI and the QP of the privacy region in the digital image based on the ROI being included in the digital image.
The adjusting the QP of the ROI may include reducing the QP of the ROI.
The adjusting the QP of the ROI and the QP of the privacy region may be based on at least one of a ratio of the ROI and the privacy region in the digital image and an amount of encoding resources saved in the privacy region.
The adjusting the QP of the ROI and the QP of the privacy region in the digital image may be performed for each macroblock within the digital image.
According to an aspect of the disclosure, a method for encoding a digital image including a privacy region, the method may include: determining whether a region of interest (ROI) is included in the digital image; based on the ROI not being included in the digital image: increasing a quantization coefficient (QP) of the privacy region based on the privacy region being a solid mask, and adjusting the QP of the privacy region according to a mosaic level based on the privacy region being a mosaic mask; and updating encoding information of the privacy region based on a change of the QP of the privacy region.
The increasing the QP of the privacy region may include setting the QP of the privacy region to a maximum value provided by an encoder based on the privacy region being a solid mask.
The adjusting the QP of the privacy region may include encoding the privacy region in a skip mode based on the privacy region being a solid mask.
The method may further include: based on the ROI being included in the digital image: adjusting a QP of the ROI and the QP of the privacy region based on a proportion of the ROI and the privacy region in the digital image; and updating encoding information of the ROI and the privacy region based on the adjusted QP of the ROI.
The method may further include: adjusting the QP of the ROI and the QP of the privacy region based on an amount of encoding resources saved in the privacy region; and updating encoding information of the ROI and the privacy region based on the adjusted QP of the ROI.
The method may further include: based on the ROI being included in the digital image: adjusting the QP of the ROI and the QP of the privacy region based on a proportion of the ROI and the privacy region in the digital image, and an amount of encoding resources saved in the privacy region; and updating encoding information of the ROI and the privacy region based on the adjusted QP for the ROI and the adjusted QP of the privacy region.
The adjusting the QP of the ROI may include reducing the QP of the ROI.
The adjusting the QP of the privacy region may include increasing the QP of the privacy region.
According to an aspect of the disclosure, further provided is a non-transitory computer-readable recording medium storing a computer-executable program comprising instructions, which, when executed by one or more processors, cause the one or more processors to execute a digital image encoding method, which may include: inputting a digital image comprising a plurality of frames, where first frames of the plurality of frames include a privacy region, and second frames of the plurality of frames include a privacy region and a region of interest (ROI); increasing a quantization coefficient (QP) of the privacy region based on a change in the privacy region among the plurality of frames; and updating encoding information of the digital image.
With respect to the first frames, the increasing the QP of the privacy region may include at least one of: increasing the QP of the privacy region based on the privacy region being a solid mask, and adjusting the QP of the privacy region according to a mosaic level based on the privacy region being a mosaic mask; and the updating the encoding information may include updating encoding information of the privacy region based on the change of the QP of the privacy region.
With respect to the second frames, the increasing the QP of the privacy region may include: increasing the QP of the privacy region based on an area ratio of the ROI and the privacy region, and decreasing the QP of the ROI in proportion to the increase in QP of the privacy region; and the updating the encoding information may include updating the encoding information of the ROI and the privacy region.
The plurality of frames may include a default region, different than the ROI and the privacy region, where, among the plurality of frames, a QP of the default region is less than the QP of the privacy region, and where, among the second frames of the plurality of frames, the QP of the default region is greater than the QP of the ROI.
The above and other aspects, features, and advantages of certain embodiments of the present disclosure will be more apparent from the following description taken in conjunction with the accompanying drawings, in which:
The technology disclosed herein may be applied to a method for encoding a digital image. However, the technology disclosed herein is not limited thereto and may also be applied to all devices and methods to which the technical idea may be applied.
Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. Like reference numerals refer to like parts throughout various figures and embodiments of the present disclosure, and redundant descriptions thereof will be omitted. The embodiments described herein are example embodiments, and thus, the disclosure is not limited thereto and may be realized in various other forms. It is to be understood that singular forms include plural referents unless the context clearly dictates otherwise. The terms including technical or scientific terms used in the disclosure may have the same meanings as generally understood by those skilled in the art.
Throughout the present disclosure, a picture or an image is defined to include both a still image and/or a moving picture having a plurality of frames, and does not exclude various forms of data that may be stored together with digital image data, such as tactile, gustatory, and distance data.
It will be understood that the terms “includes,” “comprises,” “has,” “having,” “including,” and/or “comprising,” when used in this specification, specify the presence of stated features, figures, steps, operations, components, members, or combinations thereof, but do not preclude the presence or addition of one or more other features, figures, steps, operations, components, members, or combinations thereof.
As used herein, each of the expressions “A or B,” “at least one of A and B,” “at least one of A or B,” “A, B, or C,” “at least one of A, B, and C,” and “at least one of A, B, or C,” may include one or all possible combinations of the items listed together with a corresponding expression among the expressions.
However, as shown in
With reference to
In the above description, steps, processes or operations may be further divided into additional steps, processes or operations, or combined into fewer steps, processes or operations, according to the implementation of the present disclosure. Further, some steps, processes or operations may be omitted as necessary, and the order of steps, processes or operations may be changed.
The examples described above may be implemented as software including instructions stored in machine-readable storage media or memory, which can be read by one or more processors or machines. For example, the examples described above or portions thereof may be implemented as software or code representations of physical circuits or logical representations convertible to physical circuits, such as any suitable type of hardware description language. The machine(s) refer to apparatuses that call instructions stored in a storage medium, and can operate according to the called instructions, and the apparatuses may include an electronic apparatus according to the embodiments disclosed herein. In case an instruction is executed by a processor, the processor may perform a function corresponding to the instruction by itself, or by using other components under its control. An instruction may include a code that is generated or executed by a compiler or an interpreter. A storage medium that is readable by processors or machines may be provided in the form of a non-transitory storage medium. Here, the term ‘non-transitory’ only means that a storage medium does not include signals, and is tangible, but does not indicate whether data is stored in the storage medium semi-permanently or temporarily.
The methods according to the various embodiments disclosed in the present document may be included and provided in a computer program product. The computer program product may be traded as a product between a seller and a purchaser. The computer program product may be distributed in a form of the machine-readable storage medium (for example, a compact disc read only memory (CD-ROM)), or may be distributed online through an application store (e.g., PlayStore™). In case of the online distribution, at least a part of the computer program product may be at least temporarily stored or temporarily provided in the storage medium such as a server memory of a manufacturer, a server memory of an application store, or a relay server memory.
The above-described embodiments are merely specific examples to describe technical content according to the embodiments of the disclosure and help the understanding of the embodiments of the disclosure, not intended to limit the scope of the embodiments of the disclosure. The terminologies or words used in the description and claims of the present disclosure should not be interpreted as being limited merely to common and dictionary meanings. On the contrary, they should be interpreted based on the meanings and concepts of the present disclosure according to one of ordinary skill in the art to which this disclosure pertains. The scope of the present disclosure is not limited to the embodiments disclosed in this specification, and the present disclosure may be modified, changed, or improved in various forms within the scope described in the spirit and claims of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
10-2023-0135775 | Oct 2023 | KR | national |