Image shooting method and device, electronic equipment and storage medium

By receiving multiple continuous image shooting instructions within a preset time period in the image shooting method, processing and returning images in parallel, the problem of low frequency of shooting in extremely fast shooting scenarios is solved, and a smooth shooting process and extremely fast shooting effects are achieved.

CN119342326APending Publication Date: 2025-01-21BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310898274.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-20
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the extreme-speed photo scene, when the user continuously clicks the photo button quickly, the existing technology cannot achieve faster photo frequency, resulting in poor user photo experience.

Method used

An image capturing method is provided, by receiving multiple continuous image capturing instructions within a preset time period, performing preset processing on the initial image in parallel, obtaining the processed image, and returning it to the preset application in parallel.

Benefits of technology

It realizes the rapid acquisition of the shooting image corresponding to the image shooting instruction, avoids task waiting caused by task stacking, improves the smoothness of the shooting process, achieves the technical effect of extremely fast shooting, and improves the user's shooting experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342326A_ABST
    Figure CN119342326A_ABST
Patent Text Reader

Abstract

The invention relates to an image shooting method and device, electronic equipment and a storage medium. The image shooting method comprises the following steps: receiving a plurality of image shooting instructions, wherein the plurality of image shooting instructions are continuous image shooting instructions within a preset duration; obtaining a plurality of initial images based on the plurality of image shooting instructions; executing preset processing on the plurality of initial images in parallel to obtain a plurality of processed images; and returning the plurality of processed images to the preset application program. According to the method, the shot image corresponding to the image shooting instruction can be quickly obtained, so that the shooting process of obtaining the shot image corresponding to each image shooting instruction is smoother, the technical effect of top-speed shooting can be realized, and the shooting experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to an image shooting method, device, electronic device and storage medium. Background Art

[0002] When an electronic device takes a photo, from the moment the user clicks the photo button to the moment the corresponding image is captured, the entire image capture process, including multiple photo capture tasks, needs to go through image acquisition, image processing, and image return. If the entire image capture process takes a long time, multiple images cannot be quickly captured in a very short time. Therefore, in an extremely fast photo shooting scenario, if the user clicks the photo button quickly and continuously, a faster photo frequency cannot be achieved, which affects the user's photo shooting experience. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides an image capturing method, an apparatus, an electronic device and a storage medium.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an image capturing method, the image capturing method comprising:

[0005] receiving a plurality of image capturing instructions, wherein the plurality of image capturing instructions are continuous image capturing instructions within a preset time period;

[0006] Based on the multiple image capturing instructions, obtaining multiple initial images;

[0007] Performing preset processing on the multiple initial images in parallel to obtain the multiple processed images;

[0008] The plurality of processed images are returned to a preset application.

[0009] In an exemplary embodiment, returning the plurality of processed images to the preset application comprises:

[0010] The plurality of processed images are returned to the preset application according to the order of the end times of the preset processing of the plurality of initial images.

[0011] In an exemplary embodiment, returning the plurality of processed images to the preset application comprises:

[0012] The plurality of processed images are returned to the preset application in parallel.

[0013] In an exemplary embodiment, the electronic device includes a hardware abstraction layer, the hardware abstraction layer includes an image processing unit, the image processing unit includes a plurality of image processing threads, each of the image processing threads is used to perform a preset process on a different initial image, and performs a preset process on the initial image at the same time;

[0014] The performing of preset processing on the plurality of initial images in parallel includes:

[0015] The preset processing of the multiple initial images is performed in parallel through the multiple image processing threads.

[0016] In an exemplary embodiment, the hardware abstraction layer further includes a first unit, the first unit is not associated with the image acquisition module, and the number of the first units is less than or equal to the number of the image processing threads in the image processing unit;

[0017] The step of returning the plurality of processed images to the preset application comprises:

[0018] The plurality of processed images are returned to the preset application through the first unit.

[0019] In an exemplary embodiment, outputting the plurality of processed images through the first unit includes:

[0020] If the number of the first units is greater than one, the plurality of processed images are returned to the preset application in parallel through the first unit.

[0021] In an exemplary embodiment, the electronic device includes a hardware driver layer, the hardware driver layer includes an image acquisition unit, the hardware abstraction layer also includes a second unit, and the second unit is associated with the image acquisition module;

[0022] The step of obtaining a plurality of initial images based on the plurality of image shooting instructions comprises:

[0023] The plurality of image capturing instructions are sent to the image acquisition unit through the second unit, and the plurality of initial images returned by the image acquisition unit are received.

[0024] In an exemplary embodiment, the method further comprises:

[0025] The plurality of initial images are sent to the image processing unit through the second unit.

[0026] According to a second aspect of an embodiment of the present disclosure, there is provided an image capturing device, the image capturing device comprising:

[0027] A receiving module is configured to receive a plurality of image capturing instructions, wherein the plurality of image capturing instructions are continuous image capturing instructions within a preset time length;

[0028] An image acquisition module, configured to obtain a plurality of initial images based on the plurality of image capturing instructions;

[0029] An image processing module, configured to perform preset processing on the multiple initial images in parallel to obtain the multiple processed images;

[0030] The image returning module is configured to return the plurality of processed images to the preset application.

[0031] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0032] processor;

[0033] a memory for storing processor-executable instructions;

[0034] The processor is configured to execute the method as described in the first aspect of the embodiment of the present disclosure.

[0035] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in the first aspect of the embodiment of the present disclosure.

[0036] The above method disclosed in the present invention has the following beneficial effects: it can quickly obtain the captured image corresponding to the image shooting instruction, making the shooting process of obtaining the captured image corresponding to each image shooting instruction smoother, and can achieve the technical effect of extremely fast photography, thereby improving the user's photography experience.

[0037] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0039] Figure 1 is a flow chart of an image capturing method according to an exemplary embodiment;

[0040] Figure 2 is a schematic diagram of an image capturing interface according to an exemplary embodiment;

[0041] Figure 3is a flow chart of an image capturing method according to an exemplary embodiment;

[0042] Figure 4 is a flow chart of an image capturing method according to an exemplary embodiment;

[0043] Figure 5 is a flowchart of an image capturing method according to an exemplary embodiment;

[0044] Figure 6 is a block diagram of an image capturing device according to an exemplary embodiment;

[0045] Figure 7 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0046] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0047] In the related art, during the entire image capturing process from when a user clicks a photo button to when a corresponding image is obtained, each photo task is executed serially based on the time sequence in which the user clicks the photo button. In the case of ultra-fast photography, multiple images need to be obtained in a very short time, so there will be a situation in which photo tasks are stacked and tasks wait, thereby extending the time taken for the entire image capturing process and making it impossible to achieve ultra-fast photography.

[0048] In an exemplary embodiment of the present disclosure, in order to overcome the technical problem that extremely fast photography cannot be achieved in the related art, an image shooting method is provided, which receives multiple continuous image shooting instructions within a preset time length, obtains multiple initial images based on the multiple image shooting instructions, performs preset processing on the multiple initial images in parallel, obtains multiple processed images, and returns the multiple processed images to a preset application. The method in the embodiment of the present disclosure can quickly obtain the captured images corresponding to the image shooting instructions, avoid the situation where tasks are stacked in the photography task and cause task waiting, make the shooting process of obtaining the captured images corresponding to each image shooting instruction smoother, and can achieve the technical effect of extremely fast photography, thereby improving the user's photography experience.

[0049] In an exemplary embodiment of the present disclosure, an image capturing method is provided, which is applied to an electronic device. Figure 1is a flow chart of an image capturing method according to an exemplary embodiment. Figure 1 As shown, the following steps are included:

[0050] Step S101, receiving a plurality of image capturing instructions, where the plurality of image capturing instructions are continuous image capturing instructions within a preset time period;

[0051] Step S102, obtaining a plurality of initial images based on a plurality of image shooting instructions;

[0052] Step S103, performing preset processing on multiple initial images in parallel to obtain multiple processed images;

[0053] Step S104, returning the multiple processed images to the preset application.

[0054] The method in the embodiments of the present disclosure is applied to electronic devices, including terminal devices, smart devices, smart wearable devices and other electronic devices with image capture functions.

[0055] In step S101, the electronic device receives an image capture instruction through a preset application, and the preset application is a camera application or other applications that call the camera application to capture. The preset application can be a native application in the operating system of the electronic device, and the native application is an application created and distributed by the device manufacturer or the creator of the device's operating system; the preset application can also be a third-party application provided by a third party, and the third-party application is an application created by a supplier (the supplier can be a company or an individual), and the third party is different from the device manufacturer and / or the creator of the device's operating system. In the preset application, the image capture instruction can be received through a capture button. For example, when a user clicks a capture button in the camera display interface, the electronic device receives the image capture instruction, and the display method of the capture button can be any method, such as Figure 2 The circular virtual button 201 is shown. In the application, the image shooting instruction can also be received through voice information. For example, when the user sends voice information such as "take a photo", "shoot", "shoot 30 times in a row", the electronic device receives the image shooting instruction, and the content of the voice information can be set by the user. In the application, the image shooting instruction can also be received in other ways, such as through physical buttons on the electronic device, through external devices connected to the electronic device, through air gestures and other ways. The present disclosure does not limit the way in which the electronic device receives the image shooting instruction. After receiving the image shooting instruction sent by the user, the preset application sends the image shooting instruction to the software unit in the electronic device for collecting and acquiring images, image processing and image results, and waits for receiving the image results returned by the software unit, so that the image results can be saved and displayed in the album for the user to view.

[0056] The preset time length can be any time length. The embodiment of the present disclosure is applied to the extremely fast photo shooting scene, so the preset time length is an extremely short time length, such as 1 second or half a second. Receiving multiple continuous image shooting instructions within the preset time length can be a user continuously and quickly clicking a shooting button, or a user sending a voice message of "shooting 30 times in a row", or other ways of receiving multiple continuous image shooting instructions.

[0057] In some embodiments, the image capture instruction may also be referred to as an image capture request.

[0058] In step S102, the initial image is the unprocessed image data information collected by the image acquisition unit, and the initial image is usually an image in RAW format. When multiple image shooting instructions are received, the image acquisition unit acquires multiple initial images based on the screen information of the camera preview interface. The image acquisition unit can be an image sensor or an image sensor and a camera lens and other hardware structures related to image acquisition. It should be noted that the time taken for image acquisition is usually short. In the high-speed photography scene, when the next image acquisition task arrives, the current image acquisition task can usually be completed, that is, the image acquisition unit is in an idle state, so there will be no problem of task stacking in the image acquisition process.

[0059] In step S103, the preset processing of the initial image is an image post-processing process, including image processing operations such as purple fringing removal, deblurring, and image enhancement. An image post-processing algorithm is usually used to perform the preset processing of the initial image. Each image post-processing algorithm corresponds to an image processing operation, and the preset processing of each initial image includes at least one image post-processing algorithm. The preset processing to be performed on each initial image may be the same or different, which is determined by the image data information in the initial image. For example, the preset processing corresponding to the initial image 1 is purple fringing removal and deblurring, the preset processing corresponding to the initial image 2 is purple fringing removal, and the preset processing corresponding to the initial image 3 is image enhancement.

[0060] After obtaining multiple initial images, the multiple initial images are asynchronously sent to the image post-processing process through multiple image processing threads, and the preset processing of the multiple initial images is performed in parallel in the image post-processing process to obtain multiple processed images. For example, when the initial image 1 is being processed by the preset process, the initial image 2 is obtained. At this time, there is no need to wait for the initial image 1 to finish the preset processing, but the initial image 2 is asynchronously sent to the image post-processing process, and another image processing thread is used to perform the preset processing of the initial image 2 at the same time, so as to perform the preset processing of the initial image 1 and the preset processing of the initial image 2 in parallel. Since the preset processing of the multiple initial images can be performed in parallel, the initial image obtained later can immediately start its own preset processing process without waiting for the initial image obtained earlier to finish the preset processing. Therefore, the problem of task waiting caused by the stacking of processing tasks when the preset processing of the multiple initial images is performed serially is avoided, and the image processing time can be saved.

[0061] For example, 10 initial images are subjected to preset processing, and each preset processing takes a time t. If the 10 preset processings are executed serially, that is, waiting for the previous preset processing to be completed before executing the current preset processing, the total time required to complete the 10 preset processings is 10×t; if the 10 preset processings are executed in parallel, that is, the 10 preset processings are started at the same time, since the time for image acquisition to obtain the initial image is relatively fast, the time difference between the start time of each preset processing can be ignored, and the total time required is t, which saves 9×t compared to the serial execution process.

[0062] Step S104, the processed image is the captured image corresponding to the image capturing instruction, which may also be referred to as the image capturing result or image result. After the processed image is obtained, the processed image is returned to the preset application that receives the image capturing instruction, and the entire image capturing process is completed, so that the preset application saves the processed image and displays it in the album for the user to view.

[0063] In the exemplary embodiment of the present disclosure, preset processing of multiple initial images is performed in parallel, so that processed images can be obtained quickly, and the situation where image processing tasks are stacked during preset processing and cause image processing tasks to wait is avoided, thereby saving image processing waiting time and making the preset application obtain the shooting process corresponding to each image shooting instruction more smooth, thereby achieving the technical effect of ultra-fast photography.

[0064] In an exemplary embodiment of the present disclosure, an image capturing method is provided, which is applied to an electronic device. Figure 3 is a flow chart of an image capturing method according to an exemplary embodiment. Figure 3 As shown, the following steps are included:

[0065] Step S301, receiving a plurality of image capturing instructions, where the plurality of image capturing instructions are continuous image capturing instructions within a preset time period;

[0066] Step S302, obtaining a plurality of initial images based on a plurality of image shooting instructions;

[0067] Step S303, performing preset processing on multiple initial images in parallel to obtain multiple processed images;

[0068] Step S304, returning the multiple processed images to the preset application according to the sequence of the end time of the preset processing of the multiple initial images.

[0069] The contents of step S301 to step S303 are the same as those of step S101 to step S103 and are not described again here.

[0070] In step S304, since the preset processing corresponding to each initial image may be different, the time taken for the preset processing of each initial image may also be different. According to the sequence of the end times of the preset processing of multiple initial images, that is, according to the time sequence of the end times of the preset processing, multiple processed images are returned, so that each processed image is returned at the first time, avoiding the situation of task waiting in the return task and saving the image return waiting time.

[0071] For example, after executing the first preset processing on the initial image 1, the processed image 1 is obtained, and after executing the second preset processing on the initial image 2, the processed image 2 is obtained, wherein the time occupied by the first preset processing is much longer than the time occupied by the second preset processing. When returning the processed image in the time sequence of the image shooting instruction, it is necessary to return to the processed image 1 first and then to return to the processed image 2. However, when the processed image 2 is obtained, the preset processing of the initial image 1 has not yet ended, and the processed image 1 has not yet been obtained, so it is necessary to put the processed image 2 in a waiting return state, and return to the processed image 2 after the preset processing of the initial image 1 is completed, the processed image 1 is obtained and returned to the processed image 1, thereby extending the time for the application to obtain the processed image 2. When returning the processed image according to the sequence of the end time of the preset processing of multiple initial images, since the initial image 2 completes the preset processing before the initial image 1, the processed image 2 is immediately returned when the processed image 2 is obtained, and then the processed image 1 is immediately returned when the processed image 1 is obtained later. Each processed image is returned at the first time, and there is no waiting time.

[0072] It should be noted that if the preset processing to be performed on multiple initial images is the same, that is, the time occupied by the preset processing is the same, then the order of the end time of the preset processing is the same as the order in which the user issues the image shooting instructions. The multiple processed images can also be returned to the preset application according to the order in which the multiple image shooting instructions are received.

[0073] In an exemplary embodiment of the present disclosure, multiple processed images are returned according to the order of the end times of the preset processing of multiple initial images. The processed images can be returned to the preset application immediately after the preset processing is completed, thereby avoiding the situation of task waiting in the returned task, saving the image return waiting time, and further improving the fluency of the shooting process of the preset application obtaining the image shooting instruction corresponding to the image shooting instruction, thereby achieving the technical effect of ultra-fast photography.

[0074] In an exemplary embodiment of the present disclosure, an image capturing method is provided, which is applied to an electronic device. Figure 4 is a flow chart of an image capturing method according to an exemplary embodiment. Figure 4 As shown, the following steps are included:

[0075] Step S401, receiving a plurality of image capturing instructions, where the plurality of image capturing instructions are continuous image capturing instructions within a preset time period;

[0076] Step S402, obtaining a plurality of initial images based on a plurality of image shooting instructions;

[0077] Step S403, performing preset processing on multiple initial images in parallel to obtain multiple processed images;

[0078] Step S404, returning the multiple processed images to the preset application in parallel according to the sequence of the end time of the preset processing of the multiple initial images.

[0079] The contents of step S401 to step S403 are the same as those of step S301 to step S303 and are not described again here.

[0080] In step S404, when there are multiple initial images that simultaneously complete the corresponding preset processing, if the multiple processed images obtained are returned serially, there will still be a situation where the return task is waiting. Therefore, in order to ensure that the multiple processed images obtained can be returned to the application as soon as possible, multiple image return threads are used to return multiple processed images in parallel, where each image return thread executes the return task of one processed image at a time.

[0081] The number of image return threads can be equal to the number of image processing threads that perform preset processing. For example, if there are 30 image processing threads that perform preset processing and 30 image return threads, when 30 consecutive image shooting instructions are received within 1 second, there is a one-to-one relationship between the image shooting instructions and the image processing threads, and between the image processing threads and the image return threads. Then, the preset processing of 30 initial images can be performed in parallel, and 30 processed images can be returned in parallel after the preset processing is completed, so that the 30 image shooting processes do not interfere with each other, and each image shooting process takes the shortest time, thereby achieving a shooting frequency of 30 times per second.

[0082] The number of image return threads may also be less than the number of image processing threads that execute preset processing. Since it is unlikely that all preset processing threads will end the preset processing at the same time, it is only necessary to ensure that there are idle image return threads at the end of the preset processing of the initial image. In addition, the time taken for image return is relatively short. Even if there is no idle image return thread at the end of the preset processing of a certain initial image, the processed image obtained by the preset processing is in a waiting return state. At this time, the waiting time corresponding to the waiting return state is also relatively short, and the waiting time has little effect on the time taken for the image shooting process.

[0083] It should be noted that when the number of image return threads is equal to the number of image processing threads that execute preset processing, the image return time that can be saved is the most, and the effect of returning multiple processed images in parallel is the best; the smaller the difference between the number of image return threads and the number of image processing threads that execute preset processing, the less image return time that can be saved, the better the effect of returning multiple processed images in parallel, and the faster the photo-taking frequency that can be achieved.

[0084] In the disclosed embodiment, returning multiple processed images in parallel can save more time occupied by returning images, making the process of obtaining the captured image corresponding to each image capturing instruction by the preset application program smoother, thereby further improving the image capturing speed.

[0085] In an exemplary embodiment of the present disclosure, an image capturing method is provided, which is applied to an electronic device. Figure 5 is a flowchart of an image capturing method according to an exemplary embodiment. Figure 5 As shown, the software framework of the electronic device includes an application layer 501, a hardware abstraction layer 502 and a hardware driver layer 503. The application layer 501 includes an image capture application 5011, the hardware abstraction layer 502 includes an image processing unit 5021, a first unit 5022 and a second unit 5023, the image processing unit 5021 includes a plurality of image processing threads 50211, and the hardware driver layer 503 includes an image acquisition unit 5031. Based on the above software framework layer, as shown in FIG. Figure 5 As shown, the image capturing method comprises the following steps:

[0086] Step S501, the application layer 501 receives a plurality of image capturing instructions;

[0087] Among them, multiple image shooting instructions are received through the shooting application 5011, the shooting application 5011 can be a camera application or other applications that call the camera application for shooting, and the multiple image shooting instructions are continuous image shooting instructions within a preset time length; the image shooting instructions can also be called image shooting requests.

[0088] Step S502, the application layer 501 sends a plurality of image capturing instructions to the second unit 5023;

[0089] The shooting application 5011 uses the application management service (software camara service class) to send the image shooting instruction to the second unit 5023. The second unit 5023 is associated with the image acquisition module and is an abstract description of the image acquisition module in the hardware abstraction. The second unit 5023 is a logical camera class in the software, which is encapsulated by multiple software physical camera classes, wherein multiple software physical camera classes correspond one-to-one to multiple image acquisition modules. The image acquisition module includes the camera lens device, image sensor and other hardware structures related to image acquisition in the electronic device. The image acquisition module can also be called a "physical camera".

[0090] Step S503, the second unit 5023 sends a plurality of image capturing instructions to the image acquisition unit 5031, and receives a plurality of initial images returned by the image acquisition unit 5031;

[0091] Among them, the image acquisition unit 5031 can also be the same as the image acquisition module, or it can be a partial hardware structure in the image acquisition module. For example, the image acquisition module includes a camera lens and an image sensor, and the image acquisition unit can be a camera lens and an image sensor, or it can be an image sensor.

[0092] Step S505, the second unit 5023 sends the multiple initial images to the image processing unit 5021;

[0093] Among them, the image processing unit 5021 can also be called an algorithm thread pool.

[0094] Step S505, performing preset processing on multiple initial images in parallel through multiple image processing threads 50211 in the image processing unit 5021 to obtain multiple processed images;

[0095] The number of image processing threads 50211 can be set according to actual needs, for example, according to the performance of the electronic device processor. Each image processing thread 50211 is used to perform preset processing on different initial images, and to perform a preset processing on an initial image at the same time. For example, the image processing unit includes image processing thread 1 and image processing thread 2. When the preset processing is performed on initial image 1 and initial image 2, image processing thread 1 is used to perform the preset processing on initial image 1, and image processing thread 2 is used to perform the preset processing on initial image 2. If there is an initial image 3 that needs to be preset processed by image processing thread 1 at this time, wait for the initial image 1 to finish the preset processing. Therefore, the preset processing of multiple initial images is performed in parallel, that is, within the available resource range of the image processing thread, the preset processing of multiple initial images is performed simultaneously.

[0096] The processed image is a captured image corresponding to the image capturing instruction, and may also be referred to as an image capturing result.

[0097] Step S506, returning the multiple processed images to the application layer 501 in parallel through the multiple first units 5022 according to the sequence of the end times of the preset processing of the multiple initial images;

[0098] The first unit 5022 is not associated with the image acquisition module, the number of the first units 5022 is less than or equal to the number of the image processing threads 50211 in the image processing unit 5021, and multiple processed images are returned in parallel to the shooting application 5011 through multiple first units 5022. The first unit 5022 is a software virtual camera class pre-set in the hardware abstraction layer of the software framework layer, which is only used for communication between the application layer 501 and the hardware abstraction layer 502, and the first unit does not use a private cross-process interface, but uses a standard camera interface. In addition, the first unit can also be called a "virtual camera".

[0099] The specific manner in which each software framework layer performs operations in the above embodiment has been described in detail in the embodiment of the method, and will not be elaborated here.

[0100] In the disclosed embodiment, the second unit and the first unit are combined to complete the sending of the shooting request and the return of the shooting result, wherein the second unit is used for sending the request and the first unit is used for returning the result. Compared with the related art in which the second unit is used for both sending the request and returning the result, the shot image can be obtained quickly, achieving the technical effect of extremely fast shooting. In addition, the setting of the first unit greatly improves the flexibility and scalability of the camera architecture.

[0101] In an exemplary embodiment of the present disclosure, an image capturing device is provided, which is applied to an electronic device. Figure 6 is a block diagram of an image capturing device according to an exemplary embodiment. Figure 6 As shown, including:

[0102] The receiving module 601 is configured to receive a plurality of image capturing instructions, where the plurality of image capturing instructions are continuous image capturing instructions within a preset time period;

[0103] The image acquisition module 602 is configured to obtain a plurality of initial images based on a plurality of image capturing instructions;

[0104] The image processing module 603 is configured to perform preset processing on multiple initial images in parallel to obtain multiple processed images;

[0105] The image returning module 604 is configured to return the multiple processed images to the preset application.

[0106] In an exemplary embodiment, the image return module 604 is further configured to:

[0107] The plurality of processed images are returned to the preset application according to the order of the end times of the preset processing of the plurality of initial images.

[0108] In an exemplary embodiment, the image return module 604 is further configured to:

[0109] Return multiple processed images in parallel to the preset application.

[0110] In an exemplary embodiment, the electronic device includes a hardware abstraction layer, the hardware abstraction layer includes an image processing unit, the image processing unit includes a plurality of image processing threads, each image processing thread is used to perform a preset process on a different initial image, and performs a preset process on an initial image at the same time;

[0111] The image processing module 603 is further configured to:

[0112] The preset processing of the multiple initial images is performed in parallel through the multiple image processing threads.

[0113] In an exemplary embodiment, the hardware abstraction layer further includes a first unit, the first unit is not associated with the image acquisition module, and the number of the first units is less than or equal to the number of image processing threads in the image processing unit;

[0114] The image return module 604 is further configured to:

[0115] The plurality of processed images are returned to a preset application program through the first unit.

[0116] In an exemplary embodiment, the image return module 604 is further configured to:

[0117] If the number of the first units is greater than one, the plurality of processed images are returned in parallel to the preset application program through the first units.

[0118] In an exemplary embodiment, the electronic device includes a hardware driver layer, the hardware driver layer includes an image acquisition unit, the hardware abstraction layer also includes a second unit, and the second unit is associated with the image acquisition module;

[0119] The image acquisition module 602 is further configured to:

[0120] The second unit sends a plurality of image shooting instructions to the image acquisition unit, and receives a plurality of initial images returned by the image acquisition unit.

[0121] In an exemplary embodiment, the image acquisition module 602 is further configured to:

[0122] The plurality of initial images are sent to the image processing unit through the second unit.

[0123] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0124] Figure 7 is a block diagram of an electronic device 700 according to an exemplary embodiment.

[0125] Reference Figure 7 , the electronic device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .

[0126] The processing component 702 generally controls the overall operation of the electronic device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.

[0127] The memory 704 is configured to store various types of data to support operations on the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a 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 disk or optical disk.

[0128] The power supply component 706 provides power to various components of the electronic device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 700.

[0129] The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. 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 the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0130] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the electronic device 700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.

[0131] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0132] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 can detect the open / closed state of the electronic device 700, the relative positioning of components, such as the display and keypad of the electronic device 700, and the sensor assembly 714 can also detect the position change of the electronic device 700 or a component of the electronic device 700, the presence or absence of user contact with the electronic device 700, the orientation or acceleration / deceleration of the electronic device 700, and the temperature change of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0133] The communication component 716 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0134] In an exemplary embodiment, the electronic device 700 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 to perform the above methods.

[0135] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by a processor 720 of an electronic device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0136] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a device, enables the device to execute an image capturing method, the method including the method in any of the above embodiments.

[0137] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0138] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An image capturing method, characterized in that: The image capturing method comprises: receiving a plurality of image capturing instructions, wherein the plurality of image capturing instructions are continuous image capturing instructions within a preset time period; Based on the multiple image capturing instructions, obtaining multiple initial images; Performing preset processing on the multiple initial images in parallel to obtain the multiple processed images; The plurality of processed images are returned to a preset application.

2. The image capturing method according to claim 1, characterized in that: The step of returning the plurality of processed images to a preset application comprises: The plurality of processed images are returned to the preset application according to the order of the end times of the preset processing of the plurality of initial images.

3. The image capturing method according to claim 1, characterized in that: The step of returning the plurality of processed images to the preset application comprises: The plurality of processed images are returned to the preset application in parallel.

4. The image capturing method according to claim 1, wherein: The electronic device comprises a hardware abstraction layer, the hardware abstraction layer comprises an image processing unit, the image processing unit comprises a plurality of image processing threads, each of the image processing threads is used to perform a preset process on a different initial image, and a preset process is performed on the initial image at the same time; The performing of preset processing on the plurality of initial images in parallel includes: The preset processing of the multiple initial images is performed in parallel through the multiple image processing threads.

5. The image capturing method according to claim 4, characterized in that: The hardware abstraction layer further includes a first unit, the first unit is not associated with the image acquisition module, and the number of the first units is less than or equal to the number of the image processing threads in the image processing unit; The step of returning the plurality of processed images to the preset application comprises: The plurality of processed images are returned to the preset application through the first unit.

6. The image capturing method according to claim 5, characterized in that: The step of returning the plurality of processed images to the preset application program through the first unit includes: If the number of the first units is greater than one, the plurality of processed images are returned to the preset application in parallel through the first unit.

7. The image capturing method according to claim 6, characterized in that: The electronic device includes a hardware driver layer, the hardware driver layer includes an image acquisition unit, the hardware abstraction layer also includes a second unit, and the second unit is associated with the image acquisition module; The step of obtaining a plurality of initial images based on the plurality of image shooting instructions comprises: The plurality of image capturing instructions are sent to the image acquisition unit through the second unit, and the plurality of initial images returned by the image acquisition unit are received.

8. The image capturing method according to claim 7, characterized in that: The method further comprises: The plurality of initial images are sent to the image processing unit through the second unit.

9. An image capturing device, characterized in that: The image capturing device comprises: A receiving module is configured to receive a plurality of image capturing instructions, wherein the plurality of image capturing instructions are continuous image capturing instructions within a preset time length; An image acquisition module, configured to obtain a plurality of initial images based on the plurality of image capturing instructions; An image processing module, configured to perform preset processing on the multiple initial images in parallel to obtain the multiple processed images; The image returning module returns the plurality of processed images to the preset application.

10. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the method as claimed in any one of claims 1 to 8.

11. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as claimed in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Image data processing method and related device

    CN108495043A

  • An aerial camera image enhancement apparatus and method

    CN109584143A

  • Photographing method, image processor, photographing device and electronic equipment

    CN109922322A

  • Image acquisition and processing method based on camera callback function and multi-thread technology

    CN112468724A

  • Photographing method and related device

    CN117156293A