CN116342373A - Image processing method, device, equipment and storage medium - Google Patents
Image processing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN116342373A CN116342373A CN202111588191.4A CN202111588191A CN116342373A CN 116342373 A CN116342373 A CN 116342373A CN 202111588191 A CN202111588191 A CN 202111588191A CN 116342373 A CN116342373 A CN 116342373A
- Authority
- CN
- China
- Prior art keywords
- image
- processing
- post
- determining
- original images
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 10
- 238000012805 post-processing Methods 0.000 claims abstract description 158
- 238000012545 processing Methods 0.000 claims abstract description 60
- 230000004044 response Effects 0.000 claims abstract description 45
- 238000000034 method Methods 0.000 claims abstract description 29
- 238000007781 pre-processing Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 6
- 238000004891 communication Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 238000003384 imaging method Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 239000000463 material Substances 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 230000009467 reduction Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 238000003786 synthesis reaction Methods 0.000 description 2
- 241000282472 Canis lupus familiaris Species 0.000 description 1
- 241000282326 Felis catus Species 0.000 description 1
- 241001464837 Viridiplantae Species 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000003796 beauty Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000003139 buffering effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000007730 finishing process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000003754 machining Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/60—Memory management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Studio Devices (AREA)
Abstract
The present disclosure relates to an image processing method, apparatus, device, and storage medium, the method comprising: determining a number of original images in an image buffer pool in response to receiving notification information for notifying post-processing of the original images in the image buffer pool; determining a corresponding target post-processing scheme based on a comparison result of the number of the original images and a first set number threshold; and carrying out post-processing on the original image based on the target post-processing scheme. The method and the device can improve the accuracy and the rationality of the target post-processing scheme, so that the processing quality of the images is preferentially ensured when the number of the original images in the image buffer pool is small, and the processing speed of the images is preferentially ensured when the number of the original images in the image buffer pool is large, thereby realizing the balance between the quality of the acquired images and the fluency of the snap-shot images and further improving the user experience.
Description
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image processing method, apparatus, device, and storage medium.
Background
With the rapid development of mobile terminal technology, terminal devices such as smartphones are becoming increasingly functional. The image acquisition functions such as photographing or image capturing have become indispensable functions of terminal devices such as smart phones, and requirements of users on quality and use experience of the terminal devices for acquiring images are also increasing. In the related art, in order to improve the quality of an acquired image, the amount of calculation for performing image post-processing in a terminal device is increased, so that the post-processing speed is slower, the time is longer, the smoothness of a snap shot image can be reduced, and the shooting experience of a user can be further affected.
Disclosure of Invention
To overcome the problems in the related art, embodiments of the present disclosure provide an image processing method, apparatus, device, and storage medium, which are used to solve the drawbacks in the related art.
According to a first aspect of embodiments of the present disclosure, there is provided an image processing method, the method including:
determining a number of original images in an image buffer pool in response to receiving notification information for notifying post-processing of the original images in the image buffer pool;
determining a corresponding target post-processing scheme based on a comparison result of the number of the original images and a first set number threshold;
and carrying out post-processing on the original image based on the target post-processing scheme.
In an embodiment, the determining the corresponding target post-processing scheme based on the comparison result of the number of the original images and the first set number threshold includes:
in response to determining that the number of original images is greater than or equal to the first set number threshold, determining the target post-processing scheme as a second preset post-processing scheme having an image processing speed that is higher than a default image processing speed of the first preset post-processing scheme.
In an embodiment, the determining the corresponding target post-processing scheme based on the comparison result of the number of the original images and the first set number threshold further includes:
in response to determining that the number of original images is less than the first set number threshold, determining the target post-processing scheme as the first preset post-processing scheme, the image processing quality of the first preset post-processing scheme being better than the image processing quality of the second preset post-processing scheme.
In an embodiment, the method further comprises placing an original image into the image buffer pool based on:
determining the number of original images existing in the image buffer pool in response to receiving a control instruction for acquiring the images;
acquiring a current image acquired based on an image sensor in response to determining that the number of original images is less than a second set number threshold, the second set number threshold being greater than the first set number threshold;
preprocessing the current image to obtain an original image of the current image;
and placing the original image of the current image into the image buffer pool.
In an embodiment, the method further comprises:
and in response to determining that the number of existing original images is equal to the second set number threshold, ignoring the control instruction.
According to a second aspect of embodiments of the present disclosure, there is provided an image processing apparatus including:
an image number determining module for determining the number of original images in an image buffer pool in response to receiving notification information for notifying post-processing of the original images in the image buffer pool;
the target scheme determining module is used for determining a corresponding target post-processing scheme based on a comparison result of the number of the original images and a first set number threshold;
and the image post-processing module is used for carrying out post-processing on the original image based on the target post-processing scheme.
In an embodiment, the target solution determining module includes:
and a first determining unit configured to determine, in response to determining that the number of the original images is greater than or equal to the first set number threshold, the target post-processing scheme as a second preset post-processing scheme, where an image processing speed of the second preset post-processing scheme is higher than an image processing speed of a default first preset post-processing scheme.
In an embodiment, the target solution determining module further includes:
and a second determining unit configured to determine, in response to determining that the number of original images is smaller than the first set number threshold, the target post-processing scheme as the first preset post-processing scheme, the image processing quality of the first preset post-processing scheme being better than the image processing quality of the second preset post-processing scheme.
In one embodiment, the apparatus further comprises an original image placement module;
the original image placing module comprises:
an image number determining unit configured to determine the number of original images existing in the image buffer pool in response to receiving a control instruction for acquiring an image;
a current image acquisition unit configured to acquire a current image acquired based on an image sensor in response to determining that the number of original images is smaller than a second set number threshold, the second set number threshold being larger than the first set number threshold;
the original image generating unit is used for preprocessing the current image to obtain an original image of the current image;
and the original image placing unit is used for placing the original image of the current image into the image buffer pool.
In an embodiment, the original image input module further includes:
and a control instruction ignoring unit configured to ignore the control instruction in response to determining that the number of existing original images is equal to the second set number threshold.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, the device comprising:
a processor and a memory for storing a computer program;
wherein the processor is configured to implement, when executing the computer program:
determining a number of original images in an image buffer pool in response to receiving notification information for notifying post-processing of the original images in the image buffer pool;
determining a corresponding target post-processing scheme based on a comparison result of the number of the original images and a first set number threshold;
and carrying out post-processing on the original image based on the target post-processing scheme.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements:
determining a number of original images in an image buffer pool in response to receiving notification information for notifying post-processing of the original images in the image buffer pool;
determining a corresponding target post-processing scheme based on a comparison result of the number of the original images and a first set number threshold;
and carrying out post-processing on the original image based on the target post-processing scheme.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
according to the method and the device, the number of the original images in the image buffer pool is determined in response to receiving notification information for notifying the original images in the image buffer pool, the corresponding target post-processing scheme is determined based on the comparison result of the number of the original images and the first set number threshold, the original images are further post-processed based on the target post-processing scheme, the corresponding target post-processing scheme is determined based on the comparison result of the number of the original images in the image buffer pool and the first set number threshold, and accordingly the original images can be processed by adopting different target post-processing schemes when the number of the original images in the image buffer pool is large and when the number of the original images in the image buffer pool is small, accuracy and rationality of determining the target post-processing scheme can be improved, processing quality of the images can be preferentially guaranteed when the number of the original images in the image buffer pool is small, processing speed of the images can be preferentially guaranteed when the number of the original images in the image buffer pool is large, and accordingly balance between quality of acquired images and smoothness of captured images can be achieved, and user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flowchart illustrating an image processing method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating how to determine a corresponding target post-processing scheme based on a comparison of the number of original images to a first set number threshold, according to an exemplary embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating how an original image is placed in an image buffer pool according to an exemplary embodiment of the present disclosure;
FIG. 4 is a block diagram of an image processing apparatus according to an exemplary embodiment of the present disclosure;
fig. 5 is a block diagram of yet another image processing apparatus according to an exemplary embodiment of the present disclosure;
fig. 6 is a block diagram of an electronic device, according to an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
With the rapid development of mobile terminal technology, terminal devices such as smartphones are becoming increasingly functional. Among them, an image acquisition function such as photographing or image capturing has become an indispensable function for terminal devices such as smart phones. And the requirements of users on the quality of the acquired images of the terminal equipment are also higher and higher. In the related art, in order to improve the quality of the acquired image, the amount of calculation for performing the post-processing of the image is increasing, resulting in a longer post-processing time. Since the processing speed of the front-end Image Signal Processor (ISP) is faster than that of the post-processing program, the post-processing program cannot process the image produced by the ISP in time, so a buffer pool is usually added between the pre-processing (ISP) and the post-processing in the related art for buffering the image data which cannot be processed in time. However, the buffer pool cannot be infinitely increased due to the limitation of the overall memory size of the terminal device and the requirement of the user on the imaging time, and thus, the buffer pool with the length of 5 is generally determined, and the image data is buffered and processed in the form of a queue.
When a user encounters an object that needs to be snap shot, the snap shots are typically performed by clicking the shutter in quick succession. At this time, the buffer queue may be filled, and once the buffer queue is filled, snapshot cannot be performed, so that user experience is affected. Based on the above-described problems, embodiments of the present disclosure provide the following image processing method, apparatus, device, and storage medium to solve the above-described problems in the related art.
FIG. 1 is a flowchart illustrating a method of image processing according to an exemplary embodiment; the method of the present embodiment may be applied to a terminal device (e.g., a smart phone, a tablet computer, a smart watch, a camera, a video camera, etc.) having an image acquisition function.
As shown in fig. 1, the method includes the following steps S101-S103:
in step S101, in response to receiving notification information for notifying post-processing of an original image in an image buffer pool, the number of the original images in the image buffer pool is determined.
In this embodiment, the terminal device may determine the number of the original images in the image buffer pool in response to receiving notification information for notifying post-processing of the original images in the image buffer pool.
For example, when a post-processing framework (PostProcess) of a terminal device receives notification information for notifying post-processing of an original image in an image buffer pool, the number of the original images in the image buffer pool may be determined. The notification information may be sent by a preprocessing framework (PreProcess) of the terminal device when the raw image obtained after preprocessing is put into the image buffer pool, which is not limited in this embodiment. The original image may be an image processed by a preprocessing mode such as hardware noise reduction and synthesis, and the original image may be used as an input of a post-processing flow. Illustratively, the original image may be in the format of NV12 or the like, and may be processed as a subsequent software algorithm.
In an embodiment, the image buffer pool may buffer the original image that fails to be post-processed in time in a queue. It will be appreciated that the data of the original image that can be accommodated in the image buffer pool is limited, for example, a maximum of 5 original images can be accommodated, which is limited by the memory size of the terminal device and the requirement of the user on the imaging time. On the basis of this, when the terminal device receives notification information for notifying post-processing of the original images in the image buffer pool, the number of original images that have been currently buffered in the image buffer pool can be determined.
Specifically, the image buffer pool may be a data structure stored in a form of a queue, where each storage unit may be image material required for post-processing of one shot, so that materials of multiple shots may be stored in the queue, so as to form a buffer pool, and may be used to buffer image materials that fail to be post-processed in time, that is, the original image.
In short, the original image may be an image that is rough processed (e.g., pre-processed) by the terminal hardware, and the image itself is not effective although it is visible, so that the image with better effect may be obtained after further finishing (e.g., post-processing). The buffer pool is understood to be the image buffer pool, which is used for queuing the images waiting for finishing, because the rough machining is faster, the generated original images are more, and the finishing process is slower.
It should be noted that, in different photographing modes, the generated image materials (i.e., the original images) are also different. For example, in a default normal photographing mode, when the original image needs to be processed in the post-processing process, YUV data of the image needs to be acquired, and metadata (such as exposure information, an algorithm table, etc.) of the image photographing process is also needed, where the YUV data and the metadata may be collectively referred to as materials of the image. It will be appreciated that each photograph will generate a corresponding image and metadata.
In step S102, a corresponding target post-processing scheme is determined based on the comparison result of the number of original images and the first set number threshold.
In this embodiment, when the terminal device determines, in response to receiving notification information for notifying post-processing of an original image in the image buffer pool, the number of the original images may be compared with a first set number threshold to obtain a comparison result, and further, a corresponding target post-processing scheme may be determined based on the obtained comparison result.
It should be noted that, the first set number threshold may be set based on actual needs, as long as the first set number threshold is smaller than the number of original images that can be accommodated in the image buffer pool at most. For example, in a case where the image buffer pool can accommodate at most 5 original images, the first set number threshold may be set to 4, which is not limited in this embodiment.
That is, in this embodiment, when the number of original images in the image buffer pool is greater than or equal to the first set number threshold, or is smaller than the first set number threshold, different target post-processing schemes are adopted to process the original images, so that accuracy and rationality of determining the target post-processing schemes can be improved, and when the number of original images in the image buffer pool is smaller, the processing quality of the images can be preferentially ensured, and when the number of original images in the image buffer pool is larger, the processing speed of the images can be preferentially ensured.
In step S104, the original image is post-processed based on the target post-processing scheme.
In this embodiment, after determining the corresponding target post-processing scheme based on the comparison result of the number of the original images and the first set number threshold, the post-processing may be performed on the original images based on the target post-processing scheme.
It should be noted that, the type of post-processing the original image based on the target post-processing scheme in the present embodiment may include, but is not limited to, at least one of beauty, blurring, super-resolution, and high dynamic range imaging (High Dynamic Range Imaging, HDRI or HDR for short), which is not limited in the present embodiment.
As can be seen from the foregoing description, in the method of the present embodiment, by determining, in response to receiving notification information for notifying post-processing of an original image in an image buffer pool, the number of the original images in the image buffer pool, and determining a corresponding target post-processing scheme based on a comparison result of the number of the original images and a first set number threshold, and further performing post-processing on the original image based on the target post-processing scheme, the corresponding target post-processing scheme may be determined based on a comparison result of the number of the original images in the image buffer pool and the first set number threshold, so that when the number of the original images in the image buffer pool is greater and when the number of the original images in the image buffer pool is less, different target post-processing schemes may be used to process the original images, so as to improve accuracy and rationality of determining the target post-processing scheme, to preferentially ensure processing quality of the images when the number of the original images in the image buffer pool is less, and preferentially ensure processing speed of the images when the number of the original images in the image buffer pool is greater, thereby realizing balance between quality of acquired images and quality of captured images and smoothness of captured images, and further improving user experience.
FIG. 2 is a flow chart illustrating how to determine a corresponding target post-processing scheme based on a comparison of the number of original images to a first set number threshold, according to an exemplary embodiment of the present disclosure; the present embodiment exemplifies how to determine the corresponding target post-processing scheme based on the comparison result of the number of original images and the first set number threshold. As shown in fig. 2, the determining the corresponding target post-processing scheme based on the comparison result between the number of the original images and the first set number threshold in the step S102 may include the following steps S201 to S204:
in step S201, the number of original images is compared with a first set number threshold.
In step S202, it is determined whether the number of original images is greater than or equal to the first set number threshold: if yes, go to step S203; if not, step S204 is performed.
In step S203, the target post-processing scheme is determined as a second preset post-processing scheme.
In step S204, the target post-processing scheme is determined as a first preset post-processing scheme.
In this embodiment, when the terminal device determines the number of the original images in the image buffer pool in response to receiving notification information for notifying post-processing of the original images in the image buffer pool, the number of the original images may be compared with a first set number threshold to obtain a comparison result. Illustratively, the comparison result may include: the number of the original images is larger than or equal to a first set number threshold; alternatively, the number of original images is smaller than the first set number threshold.
On the basis, when the comparison result is that the number of the original images is larger than or equal to the first set number threshold, the target post-processing scheme can be determined to be a second preset post-processing scheme, wherein the image processing speed of the second preset post-processing scheme is higher than that of the default first preset post-processing scheme. That is, when the number of the original images is determined to be greater than or equal to the first set number threshold, in order to increase the post-processing speed of the original images in the image buffer pool, the target post-processing scheme may be adjusted from the default first preset post-processing scheme to a second preset post-processing scheme with a faster processing speed, so as to preferentially ensure the processing speed of the images and increase the smoothness of the snap-shot images when the number of the original images in the image buffer pool is greater. The second preset aftertreatment scheme may be, for example, a simplified version of the first preset aftertreatment scheme (e.g., lite version), or other more rapid processing scheme.
Taking the portrait algorithm as an example, the complete version scheme (i.e. the first preset post-processing scheme) includes traditional portrait separation, and under the condition that a person is detected on a picture, the picture can be divided into various areas such as people, blue sky, green plants, flowers, cats, dogs and the like, and then different filter effects are added according to the areas. And under the condition that the picture is detected to be in existence, the simplified version scheme (namely the second preset post-processing scheme) only divides the picture into two areas of a person and a scene, and then adds different filters for the person and the scene respectively so as to realize the background blurring effect. Of course, the quality of image processing is slightly reduced as a cost of increasing the image processing speed. However, this cost may be acceptable in cases where the user is targeted for a snapshot. In other words, the user may prefer a higher processing speed but lower processing quality post-processing scheme during continuous clicking of the shutter to capture the current highlight instant.
In another case, when it is determined that the number of original images is less than the first set number threshold, the target post-processing scheme may be determined as a first preset post-processing scheme. Wherein the image processing quality of the first preset post-processing scheme is better than the image processing quality of the second preset post-processing scheme. That is, when it is determined that the number of original images is smaller than the first set number threshold, in order to achieve better image processing quality, the target post-processing scheme may be set to a default first preset post-processing scheme, so that the quality of the images is preferentially ensured when the number of original images is smaller in the image buffer pool.
As can be seen from the above description, in this embodiment, the number of original images in the image buffer pool is determined to predict whether the core requirement is imaging quality or capturing experience at this time, so as to achieve balance between improving the image quality and improving the capturing experience.
FIG. 3 is a flow chart illustrating how an original image is placed in an image buffer pool according to an exemplary embodiment of the present disclosure; the present embodiment exemplifies how to put an original image in an image buffer pool. As shown in fig. 3, the image processing method of the present embodiment may further include the following steps S301 to S306:
in step S301, in response to receiving a control instruction for acquiring an image, the number of original images existing in the image buffer pool is determined.
In step S302, it is determined whether the number of original images is smaller than a second set number threshold: if yes, go to step S303; if not, step S306 is performed.
In step S303, a current image acquired based on the image sensor is acquired.
In step S304, the current image is preprocessed, and an original image of the current image is obtained.
In step S305, the original image of the current image is put into the image buffer pool.
In step S306, the control instruction is ignored.
In this embodiment, the terminal device may determine, in response to receiving a control instruction for acquiring an image, the number of existing original images in the image buffer pool, and further acquire a current image acquired based on the image sensor when it is determined that the number of original images is smaller than a second set number threshold, and perform preprocessing on the current image to obtain an original image of the current image, and then place the original image of the current image in the image buffer pool. And when it is determined that the number of the original images is equal to a second set number threshold, the control instruction may be ignored. The second set number threshold is greater than the first set number threshold, and may be the number of original images that can be accommodated in the image buffer pool at most, such as 5 images.
For example, when a user opens a camera application of the terminal device and clicks a shutter to trigger photographing, the camera application of the terminal device may determine whether a queue of the image buffer pool is full in response to receiving a photographing instruction (i.e., the control instruction for acquiring an image described above). Illustratively, the full queue may be determined when the queue length reaches 5. Specifically, the following two cases can be distinguished:
1) When the number of the original images in the image buffer pool is equal to a second set number threshold, judging that the photographing is invalid at the time, and not triggering photographing (namely, ignoring the control instruction), wherein the user fails to snapshot;
2) When the image buffer pool is not filled, that is, the number of original images in the image buffer pool is smaller than a second set number threshold, shooting is triggered, and a preprocessing flow (PreProcess) is entered. That is, after the current image acquired from the image sensor is preprocessed by an Image Signal Processor (ISP), a corresponding original image is generated, and then the original image is put into a queue of a buffer pool. The scheme of the preprocessing may be set based on actual needs, which is not limited in this embodiment. Illustratively, the preprocessing may include noise reduction of the current image acquired from the image sensor, conversion from the Bayer format to the YUV format, and the like, and may be implemented mainly based on multi-frame synthesis. For example, after the image sensor outputs an image in a raw format of 8 frames, an Image Signal Processor (ISP) may perform format conversion and superposition noise reduction on the 8 frames, and may finally synthesize a low-noise YUV format image. It will be appreciated that this pretreatment process is for illustrative purposes only, and that other pretreatment modes may be selected as desired in an actual implementation.
Fig. 4 is a block diagram of an image processing apparatus according to an exemplary embodiment; the apparatus of this embodiment may be applied to a terminal device (e.g., a smart phone, a tablet computer, a smart watch, a camera, a video camera, etc.) having an image acquisition function, as shown in fig. 4, the apparatus includes an image number determining module 110, a target scheme determining module 120, and an image post-processing module 130, where:
an image number determining module 110, configured to determine the number of original images in an image buffer pool in response to receiving notification information for notifying post-processing of the original images in the image buffer pool;
a target scheme determining module 120, configured to determine a corresponding target post-processing scheme based on a comparison result of the number of original images and a first set number threshold;
an image post-processing module 130, configured to post-process the original image based on the target post-processing scheme.
As can be seen from the foregoing description, the apparatus in this embodiment determines, in response to receiving notification information for notifying post-processing of an original image in an image buffer pool, the number of the original images in the image buffer pool, and determines a corresponding target post-processing scheme based on a comparison result of the number of the original images and a first set number threshold, and further performs post-processing on the original image based on the target post-processing scheme, so as to determine the corresponding target post-processing scheme based on a comparison result of the number of the original images in the image buffer pool and the first set number threshold, thereby processing the original image by using different target post-processing schemes when the number of the original images in the image buffer pool is greater and when the number of the original images in the image buffer pool is less, improving accuracy and rationality of determining the target post-processing scheme, so as to preferentially ensure processing quality of the image when the number of the original images in the image buffer pool is less, preferentially ensuring processing speed of the image when the number of the original images in the image buffer pool is greater, and further realizing balance between quality of acquired images and quality of captured images and smoothness of captured images.
Fig. 5 is a block diagram of an image processing apparatus according to still another exemplary embodiment; the apparatus of this embodiment may be applied to a terminal device (such as a smart phone, a tablet computer, a smart watch, a camera, a video camera, etc.) having an image acquisition function, where the functions of the image number determining module 210, the target scheme determining module 220, and the image post-processing module 230 are the same as those of the image number determining module 110, the target scheme determining module 120, and the image post-processing module 130 in the embodiment shown in fig. 4, and are not described herein.
As shown in fig. 5, the target scheme determining module 220 may include:
a first determining unit 221, configured to determine, in response to determining that the number of the original images is greater than or equal to the first set number threshold, the target post-processing scheme as a second preset post-processing scheme, where an image processing speed of the second preset post-processing scheme is higher than an image processing speed of a default first preset post-processing scheme.
In an embodiment, the objective scheme determination module 220 may further include:
a second determining unit 222, configured to determine, in response to determining that the number of the original images is smaller than the first set number threshold, the target post-processing scheme as the first preset post-processing scheme, where the image processing quality of the first preset post-processing scheme is better than the image processing quality of the second preset post-processing scheme.
In an embodiment, the apparatus may further include an original image placement module 240;
the original image placement module 240 may include:
an image number determining unit 241 for determining the number of original images existing in the image buffer pool in response to receiving a control instruction for acquiring an image;
a current image obtaining unit 242, configured to obtain a current image acquired based on an image sensor in response to determining that the number of the original images is smaller than a second set number threshold, where the second set number threshold is larger than the first set number threshold;
an original image generating unit 243, configured to perform preprocessing on the current image to obtain an original image of the current image;
an original image placing unit 244 is configured to place an original image of the current image into the image buffer pool.
In an embodiment, the original image input module 240 may further include:
a control instruction ignoring unit 245 for ignoring the control instruction in response to determining that the number of existing original images is equal to the second set number threshold.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 6 is a block diagram of an electronic device, according to an example embodiment. For example, device 900 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, and the like.
Referring to fig. 6, device 900 may include one or more of the following components: a processing component 902, a memory 904, a power component 906, a multimedia component 908, an audio component 910, an input/output (I/O) interface 912, a sensor component 914, and a communication component 916.
The processing component 902 generally controls overall operation of the device 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 902 can include one or more modules that facilitate interaction between the processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support operations at the device 900. Examples of such data include instructions for any application or method operating on device 900, contact data, phonebook data, messages, pictures, videos, and the like. The memory 904 may be implemented by any type of volatile or nonvolatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 906 provides power to the various components of the device 900. Power supply components 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device 900.
The multimedia component 908 comprises a screen between the device 900 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front-facing camera and/or a rear-facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 900 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 910 is configured to output and/or input audio signals. For example, the audio component 910 includes a Microphone (MIC) configured to receive external audio signals when the device 900 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 further includes a speaker for outputting audio signals.
The I/O interface 912 provides an interface between the processing component 902 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 914 includes one or more sensors for providing status assessment of various aspects of the device 900. For example, the sensor assembly 914 may detect the on/off state of the device 900, the relative positioning of the components, such as the display and keypad of the device 900, the sensor assembly 914 may also detect the change in position of the device 900 or one component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration/deceleration of the device 900, and the change in temperature of the device 900. The sensor assembly 914 may also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 916 is configured to facilitate communication between the device 900 and other devices, either wired or wireless. The device 900 may access a wireless network based on a communication standard, such as WiFi,2G or 3G,4G or 5G, or a combination thereof. In one exemplary embodiment, the communication component 916 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 900 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as a memory 904 including instructions executable by the processor 920 of the device 900 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (12)
1. An image processing method, the method comprising:
determining a number of original images in an image buffer pool in response to receiving notification information for notifying post-processing of the original images in the image buffer pool;
determining a corresponding target post-processing scheme based on a comparison result of the number of the original images and a first set number threshold;
and carrying out post-processing on the original image based on the target post-processing scheme.
2. The method of claim 1, wherein determining the corresponding target post-processing scheme based on the comparison of the number of original images to a first set number threshold comprises:
in response to determining that the number of original images is greater than or equal to the first set number threshold, determining the target post-processing scheme as a second preset post-processing scheme having an image processing speed that is higher than a default image processing speed of the first preset post-processing scheme.
3. The method of claim 2, wherein determining the corresponding target post-processing scheme based on the comparison of the number of original images to a first set number threshold further comprises:
in response to determining that the number of original images is less than the first set number threshold, determining the target post-processing scheme as the first preset post-processing scheme, the image processing quality of the first preset post-processing scheme being better than the image processing quality of the second preset post-processing scheme.
4. The method of claim 1, further comprising placing an original image into the image buffer pool based on:
determining the number of original images existing in the image buffer pool in response to receiving a control instruction for acquiring the images;
acquiring a current image acquired based on an image sensor in response to determining that the number of existing original images is less than a second set number threshold, the second set number threshold being greater than the first set number threshold;
preprocessing the current image to obtain an original image of the current image;
and placing the original image of the current image into the image buffer pool.
5. The method according to claim 4, wherein the method further comprises:
and in response to determining that the number of existing original images is equal to the second set number threshold, ignoring the control instruction.
6. An image processing apparatus, characterized in that the apparatus comprises:
an image number determining module for determining the number of original images in an image buffer pool in response to receiving notification information for notifying post-processing of the original images in the image buffer pool;
the target scheme determining module is used for determining a corresponding target post-processing scheme based on a comparison result of the number of the original images and a first set number threshold;
and the image post-processing module is used for carrying out post-processing on the original image based on the target post-processing scheme.
7. The apparatus of claim 6, wherein the target scenario determination module comprises:
and a first determining unit configured to determine, in response to determining that the number of the original images is greater than or equal to the first set number threshold, the target post-processing scheme as a second preset post-processing scheme, where an image processing speed of the second preset post-processing scheme is higher than an image processing speed of a default first preset post-processing scheme.
8. The apparatus of claim 7, wherein the target scenario determination module further comprises:
and a second determining unit configured to determine, in response to determining that the number of original images is smaller than the first set number threshold, the target post-processing scheme as the first preset post-processing scheme, the image processing quality of the first preset post-processing scheme being better than the image processing quality of the second preset post-processing scheme.
9. The apparatus of claim 6, further comprising an original image placement module;
the original image placing module comprises:
an image number determining unit configured to determine the number of original images existing in the image buffer pool in response to receiving a control instruction for acquiring an image;
a current image acquisition unit configured to acquire a current image acquired based on an image sensor in response to determining that the number of original images is smaller than a second set number threshold, the second set number threshold being larger than the first set number threshold;
the original image generating unit is used for preprocessing the current image to obtain an original image of the current image;
and the original image placing unit is used for placing the original image of the current image into the image buffer pool.
10. The apparatus of claim 9, wherein the original image placement module further comprises:
and a control instruction ignoring unit configured to ignore the control instruction in response to determining that the number of existing original images is equal to the second set number threshold.
11. An electronic device, the device comprising:
a processor and a memory for storing a computer program;
wherein the processor is configured to implement, when executing the computer program:
determining a number of original images in an image buffer pool in response to receiving notification information for notifying post-processing of the original images in the image buffer pool;
determining a corresponding target post-processing scheme based on a comparison result of the number of the original images and a first set number threshold;
and carrying out post-processing on the original image based on the target post-processing scheme.
12. A computer readable storage medium having stored thereon a computer program, the program being embodied when executed by a processor:
determining a number of original images in an image buffer pool in response to receiving notification information for notifying post-processing of the original images in the image buffer pool;
determining a corresponding target post-processing scheme based on a comparison result of the number of the original images and a first set number threshold;
and carrying out post-processing on the original image based on the target post-processing scheme.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111588191.4A CN116342373A (en) | 2021-12-23 | 2021-12-23 | Image processing method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111588191.4A CN116342373A (en) | 2021-12-23 | 2021-12-23 | Image processing method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116342373A true CN116342373A (en) | 2023-06-27 |
Family
ID=86890026
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111588191.4A Pending CN116342373A (en) | 2021-12-23 | 2021-12-23 | Image processing method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116342373A (en) |
-
2021
- 2021-12-23 CN CN202111588191.4A patent/CN116342373A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102381713B1 (en) | Photographic method, photographic apparatus, and mobile terminal | |
EP3512190A1 (en) | Method and device for acquiring image, terminal and computer-readable storage medium | |
CN105245775B (en) | camera imaging method, mobile terminal and device | |
CN112425156B (en) | Method for selecting images based on continuous shooting and electronic equipment | |
CN112217990B (en) | Task scheduling method, task scheduling device and storage medium | |
CN114500821B (en) | Photographing method and device, terminal and storage medium | |
CN111343386B (en) | Image signal processing method and device, electronic device and storage medium | |
CN110995993A (en) | Star track video shooting method, star track video shooting device and storage medium | |
EP3905660A1 (en) | Method and device for shooting image, and storage medium | |
CN111461950B (en) | Image processing method and device | |
CN114338956B (en) | Image processing method, image processing apparatus, and storage medium | |
CN114666490B (en) | Focusing method, focusing device, electronic equipment and storage medium | |
CN111698414B (en) | Image signal processing method and device, electronic device and readable storage medium | |
CN113315904B (en) | Shooting method, shooting device and storage medium | |
CN113315903B (en) | Image acquisition method and device, electronic equipment and storage medium | |
CN116866729A (en) | Shooting method, shooting device and medium | |
CN116342373A (en) | Image processing method, device, equipment and storage medium | |
CN114418865A (en) | Image processing method, device, equipment and storage medium | |
CN114079724B (en) | Taking-off snapshot method, device and storage medium | |
CN111756985A (en) | Image shooting method, device and storage medium | |
EP3945717A1 (en) | Take-off capture method and electronic device, and storage medium | |
CN109862252B (en) | Image shooting method and device | |
CN116489498A (en) | Image preview method, image preview device, electronic device, and storage medium | |
CN117956268A (en) | Preview frame rate control method and device thereof | |
CN118433527A (en) | Focusing method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |