A method and device for generating billion-pixel images based on mobile phones
By initializing and configuration of the camera equipment on the mobile phone, the output of 100 billion -level pixel images is achieved, solving the problem of efficient processing and output high -resolution images on the mobile phone, and improving the market competitiveness of the mobile phone.
Patent Information
- Application Number
- CN202310275673.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2043-03-17
AI Technical Summary
There are difficulties in achieving the output of million-pixel images on mobile phones, and the prior art is difficult to efficiently process and output high-resolution images on mobile phones.
By initialization of all camera equipment when the mobile phone system starts, responds to the user to obtain and initialize the target camera equipment when the user opens the camera application, and configure the 100 million pixel image output. Then, when the user shoots operation, the camera device is triggered to take pictures and re -arranges the Bayer array processing, generate 100 million pixel images, and display it on the application layer.
The mobile phones shoot higher resolution and larger images, ensure the higher pixels and clearer effects of the image, thereby improving the ability of mobile phones in market competition.
Smart Images

Figure CN116389637B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for generating billion-pixel images based on a mobile phone. Background Art
[0002] In the prior art, the image processing method of billion-pixel has appeared in the field of digital cameras for a long time, but it is challenging to apply it on mobile phones. In addition, directly outputting billion-pixel photos on digital cameras will take up a lot of memory, so it will be very difficult to output billion-pixel images on mobile phones. In order to stimulate more users to pursue higher-definition and higher-pixel mobile phones, the output of billion-pixel images has become an increasingly popular application in the mobile phone field. However, how to apply billion-pixel images in the mobile phone field has become a major research topic in the current industry. Summary of the invention
[0003] One purpose of the present application is to provide a method and device for generating billion-pixel images based on a mobile phone. By configuring the camera device in the mobile phone to output billion-pixel images, the mobile phone can capture images with greater resolution and output larger sizes, ensuring that the mobile phone can capture higher-pixel images, thereby improving the selling point of the mobile phone in market competition.
[0004] According to one aspect of the present application, a method for generating a billion-pixel image based on a mobile phone is provided, wherein the method comprises:
[0005] When the system of the mobile phone is started, initialization operations are performed on all cameras supported by the mobile phone through the camera provider process in the mobile phone;
[0006] In response to the user opening a camera application, obtaining a target camera device through the provider process, and performing an initialization operation on the target camera device;
[0007] Configuring configuration information for outputting a billion-pixel image to the target camera device;
[0008] In response to a shooting operation performed by the user in the camera application, triggering the target camera device to take an image and rearrange the Bayer array for processing, so as to obtain a billion-pixel image taken by the target camera device;
[0009] The billion-pixel image is displayed at the application layer of the mobile phone.
[0010] Furthermore, in the above method, when the system of the mobile phone is started, initialization operations are performed on all cameras supported by the mobile phone through the camera provider process in the mobile phone, including:
[0011] When the system of the mobile phone is started, the provider process of the camera in the mobile phone starts to run and obtains the camera structure;
[0012] Calling the camera quantity acquisition interface through the camera structure to obtain the number of cameras supported by the underlying layer;
[0013] All cameras corresponding to the number of cameras supported by the mobile phone are initialized through the camera provider process in the mobile phone.
[0014] Furthermore, in the above method, in response to the user opening the camera application, obtaining the target camera device through the provider process and performing an initialization operation on the target camera device includes:
[0015] In response to the user opening the application, calling the camera opening function in the camera management;
[0016] Call the connect device method in the camera service;
[0017] notifying the provider process by opening a camera device interface;
[0018] Acquire the target camera device and its corresponding structure by calling an open method corresponding to the type in the acquired camera structure within the provider process;
[0019] In the provider process, an initialization method of a structure corresponding to the target camera device is called to perform an initialization operation on the target camera device.
[0020] Furthermore, in the above method, the configuration information for outputting a billion-pixel image to the target camera device includes:
[0021] Call the create picture use case interface to obtain the camera device instance corresponding to the target camera device;
[0022] Notify the camera service to call the configuration flow method and configuration information of the billion-pixel image output through the camera application programming interface API;
[0023] In the configuration flow method, notify the provider process through the HIDL interface to handle the configuration of the target camera device;
[0024] In the provider process, the configuration information is passed into the running module CamX-CHI by calling the open method, and the running module CamX-CHI configures the configuration information of the billion-pixel image output of the target camera device.
[0025] Furthermore, in the above method, in response to the shooting operation performed by the user in the camera application, triggering the target camera device to take an image and rearrange the Bayer array for processing to obtain a billion-pixel image shot by the target camera device includes:
[0026] In response to a shooting operation performed by the user in the camera application, triggering the target camera device to initiate a photo request;
[0027] Send the photo request to the camera service through the camera application programming interface API by using the photo taking or re-sending request method of the camera device use case interface corresponding to the target camera device;
[0028] Sending the photo request to a request thread within the camera service;
[0029] sending the photo request to the provider process in the request thread;
[0030] The provider process calls the photo request of the structure corresponding to the target camera device, and the running module CamX-CHI starts to perform Bayer array rearrangement processing at the HAL layer to obtain the billion-pixel image taken by the target camera device.
[0031] Furthermore, in the above method, the provider process calls the photo request of the structure corresponding to the target camera device, and the running module CamX-CHI starts to perform the Bayer array rearrangement processing at the HAL layer to obtain the billion-pixel image taken by the target camera device, including:
[0032] When processing the photo request, if metadata is generated in the node Node, the metadata processing method in the node Node will be called to notify the subordinate pipeline Pipeline;
[0033] The node Node internally calls the metadata processing method in the pipeline Pipeline;
[0034] Each time a metadata processing method in the pipeline is called, the number of metadata processing methods is increased by 1, and it is determined whether the current number is equal to the number of nodes in the pipeline;
[0035] If they are equal, the metadata request processing method is called to retrieve the metadata in the node Node and repackage it into a result data structure;
[0036] The result data structure is passed as a parameter to the camera Session module;
[0037] And in the camera Session module, the metadata in the pipeline is returned to the CHI module through a layer-by-layer calling method to obtain the billion-pixel image taken by the target camera device.
[0038] According to another aspect of the present application, a non-volatile storage medium is also provided, on which computer-readable instructions are stored. When the computer-readable instructions can be executed by a processor, the processor implements the above-mentioned method for generating a billion-pixel image based on a mobile phone.
[0039] According to another aspect of the present application, a device for generating a billion-pixel image based on a mobile phone is also provided, wherein the device comprises:
[0040] one or more processors;
[0041] A computer readable medium for storing one or more computer readable instructions,
[0042] When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the above-mentioned method for generating a billion-pixel image based on a mobile phone.
[0043] Compared with the prior art, the present application performs initialization operations on all cameras supported by the mobile phone through the provider process of the camera in the mobile phone when the system of the mobile phone is started; in response to the user opening the camera application, the target camera device is obtained through the provider process, and the target camera device is initialized; the configuration information of the billion-pixel image output is configured for the target camera device; in response to the shooting operation performed by the user in the camera application, the target camera device is triggered to take an image and rearrange the Bayer array for processing, so as to obtain the billion-pixel image taken by the target camera device; the billion-pixel image is displayed at the application layer of the mobile phone, so that the camera device in the mobile phone is configured to output the billion-pixel image, so that the mobile phone can shoot images with higher resolution and larger size, thereby ensuring that the mobile phone can shoot images with higher pixels and clearer images, further improving the selling point of the mobile phone in the market competition. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0045] Figure 1 A schematic diagram showing a flow chart of a method for generating a billion-pixel image based on a mobile phone according to one aspect of the present application;
[0046] Figure 2A timing diagram showing each processing stage of a method for generating a mobile phone-based billion-pixel image according to one aspect of the present application;
[0047] Figure 3 A processing diagram showing a remosaic stage of a Bayer array rearrangement in a method for generating a billion-pixel image based on a mobile phone according to one aspect of the present application;
[0048] Figure 4 A comparison diagram of image output in a method for generating a billion-pixel image based on a mobile phone according to one aspect of the present application is shown.
[0049] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0050] The present application is described in further detail below in conjunction with the accompanying drawings.
[0051] In a typical configuration of the present application, the terminal, the device of the service network and the trusted party all include one or more processors (CPU), input / output interfaces, network interfaces and memories.
[0052] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0053] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0054] In one aspect of the present application, a method for generating a billion-pixel image based on a mobile phone is proposed, the method comprising steps S11, S12, S13, S14 and S15, wherein the steps specifically include the following:
[0055] Step S11, when the system of the mobile phone is started, initialization operations are performed on all cameras supported by the mobile phone through the camera provider process in the mobile phone;
[0056] Step S12, in response to the user opening the camera application, obtaining a target camera device through the provider process, and performing an initialization operation on the target camera device;
[0057] Step S13, configuring the configuration information of outputting a billion-pixel image to the target camera device;
[0058] Step S14, in response to the shooting operation performed by the user in the camera application, triggering the target camera device to take an image and rearrange the Bayer array for processing, so as to obtain a billion-pixel image taken by the target camera device;
[0059] Step S15, displaying the billion-pixel image at the application layer of the mobile phone.
[0060] Through the above steps S11 to S15, when the system of the mobile phone is started, all cameras supported by the mobile phone are initialized through the provider process of the camera in the mobile phone; in response to the user opening the camera application, the target camera device is obtained through the provider process, and the target camera device is initialized; the configuration information of the billion-pixel image output is configured for the target camera device; in response to the shooting operation performed by the user in the camera application, the target camera device is triggered to take an image and rearrange the Bayer array for processing, so as to obtain the billion-pixel image taken by the target camera device; the billion-pixel image is displayed at the application layer of the mobile phone, so that the camera device in the mobile phone is configured to output the billion-pixel image, so that the mobile phone can shoot images with higher resolution and larger size, thereby ensuring that the mobile phone can shoot images with higher pixels and clearer images, further improving the selling point of the mobile phone in the market competition.
[0061] In this application, if Figure 2As shown, a sensor is provided in the mobile phone, and the pixel structure is transformed by independent ISP (image signal processing) signal processing inside the sensor. Each photosensitive unit can independently display and output data, and can shoot a normal hardware-directed Bayer arrangement, and then generate a 100 million pixel picture after being processed by a jpeg (an image format) encoder. Among them, the difference from general sensors is mainly reflected in the remosaic stage of rearranging the Bayer array. A sensor Sensor that can directly output the Bayer arrangement by hardware is selected. The pixels are rearranged before the image information is transmitted to the image processing engine IPE, and sent to the image signal processing isp pipeline for processing and output. Considering the power consumption, a picture with hundreds of millions of pixels will be generated when taking pictures. Whether to use the hundreds of millions pixel preview depends on the situation when previewing.
[0062] The generated billion-pixel images need to be post-calibrated and processed by crosstalk to reduce false color interference. The calibration and processing crosstalk tool will divide the generated billion-pixel images into multiple mask-coded ROI blocks, calculate the energy of each pixel channel, determine its compensation data and send it to the sensor. The sensor chip then uses these calibration data to make the originally uneven energy distribution more balanced.
[0063] There is also a software-based remosaic method that rearranges the Bayer array. This method is different from the above hardware direct output method. It does not require the sensor itself to have such high capabilities. The software algorithm calculates a certain weight ratio based on the distance through pixel swapping or the connection between the pixel and the surrounding related pixels. This is used as the signal value of the pixel and sent to the platform for processing. The process processing stage is the same as the hardware method, but the processing time is longer and the cost is relatively lower. In this way, 4-in-1: 4cell1 plus the remosaic method of rearranging the Bayer array can successfully take pictures with billions of pixels.
[0064] Following the above embodiment of the present application, when the system of the mobile phone is started, the step S11 performs initialization operations on all cameras supported by the mobile phone through the camera provider process in the mobile phone, specifically including:
[0065] When the system of the mobile phone is started, the provider process of the camera in the mobile phone starts to run and obtains the camera structure;
[0066] Calling the camera quantity acquisition interface through the camera structure to obtain the number of cameras supported by the underlying layer;
[0067] All cameras corresponding to the number of cameras supported by the mobile phone are initialized through the camera provider process in the mobile phone.
[0068] In actual application scenarios, when the camera provider process Camera Provider is initialized, when the mobile phone system starts, the main program of the camera provider process Camera Provider will be run and obtain the camera structure camera_module_t. During the entire initialization process, the camera number acquisition interface: get_number_of_camera will be called through the obtained camera structure camera_module_t to obtain the number of cameras supported by the underlying layer. Since it is the first time to obtain, all cameras corresponding to the number of cameras supported by the mobile phone will be initialized in the camera running module CamX-CHI, and the initialization operation of all cameras supported by the mobile phone has been completed.
[0069] Following the above embodiment of the present application, in response to the user opening the camera application, step S12 obtains the target camera device through the provider process and performs an initialization operation on the target camera device, specifically including:
[0070] In response to the user opening the application, calling the camera opening function in the camera management;
[0071] Call the connect device method in the camera service;
[0072] notifying the provider process by opening a camera device interface;
[0073] Acquire the target camera device and its corresponding structure by calling an open method corresponding to the type in the acquired camera structure within the provider process;
[0074] In the provider process, an initialization method of a structure corresponding to the target camera device is called to perform an initialization operation on the target camera device.
[0075] In actual application scenarios, once the user opens the camera application, the camera application App will call the camera open openCamera method in the camera manager CameraManager, and then finally call the camera service CameraService's connection device method: CameraService::connectDevice method, and then notify the provider process Provider by opening the camera device interface ICameraDevice::open(), a HIDL interface, and then inside the provider process Provider, call the open method open corresponding to the type methods in the previously obtained camera structure camera_module_t to obtain a target camera device that needs to be shot. Corresponding to the structure camera3_device_t corresponding to the target camera device in the camera's HAL layer; then, in the provider process Provider, the initialization method initialize of the structure camera3_device_t corresponding to the obtained target camera device will continue to be called to initialize the target camera device to complete the initialization of the target camera device.
[0076] Following the above embodiment of the present application, the step S13 configures the configuration information of the target camera device for outputting a billion-pixel image, specifically including:
[0077] Call the create picture use case interface to obtain the camera device instance corresponding to the target camera device;
[0078] Notify the camera service to call the configuration flow method and configuration information of the billion-pixel image output through the camera application programming interface API;
[0079] In the configuration flow method, notify the provider process through the HIDL interface to handle the configuration of the target camera device;
[0080] In the provider process, the configuration information is passed into the running module CamX-CHI by calling the open method, and the running module CamX-CHI configures the configuration information of the billion-pixel image output of the target camera device.
[0081] In actual application scenarios, when configuring the target camera device to output billion-pixel images, it is necessary to call the create image use case interface CameraDevice.createCaptureSession to obtain the camera device instance CameraDeviceSession corresponding to the target camera device after obtaining and opening the target camera device during the process of opening the camera application, and notify the camera service Camera through the camera application programming interface: Camera api v2 standard interface. Service, calls the configuration stream method CameraDeviceClient.endConfigure and its configuration information for billion-pixel image output. Inside the configuration stream method for billion-pixel image output, the provider process Provider is notified through the HIDL interface ICameraDeviceSession::configureStreams_3_4 (configuration stream format) to start processing the configuration requirements of the target camera device. Inside the provider process Provider, the configure_streams (corresponding configuration stream) method of the structure camera3_device_t corresponding to the target camera device obtained in the call to the open method open process is used to pass the configuration information such as size, frame rate, exposure parameters, etc. to the camera's operating module CamX-CHI. Then the camera's operating module CamX-CHI completes the configuration of the configuration information.
[0082] Following the above embodiment of the present application, the step S14 triggers the target camera device to take an image and rearrange the Bayer array for processing in response to the shooting operation performed by the user in the camera application, so as to obtain a billion-pixel image shot by the target camera device, specifically including:
[0083] In response to a shooting operation performed by the user in the camera application, triggering the target camera device to initiate a photo request;
[0084] Send the photo request to the camera service through the camera application programming interface API by using the photo taking or re-sending request method of the camera device use case interface corresponding to the target camera device;
[0085] Sending the photo request to a request thread within the camera service;
[0086] sending the photo request to the provider process in the request thread;
[0087] The provider process calls the photo request of the structure corresponding to the target camera device, and the running module CamX-CHI starts to perform Bayer array rearrangement processing at the HAL layer to obtain the billion-pixel image taken by the target camera device.
[0088] In actual application scenarios, when processing the capture request ProcessCaptureRequest initiated by the target camera device, when the user opens the camera application for preview or clicks a photo operation, a photo request is triggered. This action first sends the request to the camera service through the camera application programming interface Camera API v2 interface through the capture (photo) or setRepeatingRequest (re-send request) method of the camera device use case interface CameraDeviceSession, and then sends the request to the camera service Camera Service through the camera application programming interface Camera API v2 interface. The service sends the shooting request to the request thread CameraDevice::RequestThread for processing. Once entering the request thread, it will eventually process the photo request through the HIDL interface and send the photo request ICameraCaptureSession:processCaptureRequest_3_4 to the provider process Provider. After that, when the provider process receives the shooting request, it will call the photo request process_capture_request of the structure camera3_device_t corresponding to the target camera device to start the processing of this Request at the HAL layer in the camera. The processing is implemented by the running module CamX-CHI to obtain the billion-pixel image taken by the target camera device.
[0089] Furthermore, the provider process calls the photo request of the structure corresponding to the target camera device, and the running module CamX-CHI starts to perform the Bayer array rearrangement processing at the HAL layer to obtain the billion-pixel image taken by the target camera device, specifically including:
[0090] When processing the photo request, if metadata is generated in the node Node, the metadata processing method in the node Node will be called to notify the subordinate pipeline Pipeline;
[0091] The node Node internally calls the metadata processing method in the pipeline Pipeline;
[0092] Each time a metadata processing method in the pipeline is called, the number of metadata processing methods is increased by 1, and it is determined whether the current number is equal to the number of nodes in the pipeline;
[0093] If they are equal, the metadata request processing method is called to retrieve the metadata in the node Node and repackage it into a result data structure;
[0094] The result data structure is passed as a parameter to the camera Session module;
[0095] And in the camera Session module, the metadata in the pipeline is returned to the CHI module through a layer-by-layer calling method to obtain the billion-pixel image taken by the target camera device.
[0096] In actual application scenarios, during the entire request requets flow, once metadata Partial Meta Data is generated in the node Node, the node Node's metadata processing method ProcessPartialMetadataDone will be called to notify the subordinate pipeline Pipeline, and the node Node will call the pipeline Pipeline's metadata method NotifyNodePartialMetadataDone. Each time the NotifyNodePartialMetadataDone (metadata processing method, method 2) method of the pipeline Pipeline is called, the number of metadata processing methods pPerRequestInfo→numNodesPartialMetadataDone will be increased by one and it will be determined whether the current value is equal to the number of nodes in the pipeline Pipeline. Once they are equal, it means that all current nodes Node have completed the update of metadata partial metadata. At this time, the metadata request processing method ProcessPartialMetadataRequestIdDone will be called, which will retrieve the metadata partial metadata. data, and repackage it into a result data structure ResultsData, and use the result data structure ResultsData as a parameter, and pass it into Session (a module in the camera) through the NotifyResult (method) method of Session (a module in the camera), and then in Session (a module in the camera), after layers of calls, it will eventually call the internal member variable m_chiCallBacks (callback variable) of the photo processing method ChiProcessPartialCaptureResult method. The photo processing method ChiProcessPartialCaptureResult is the method of the Usecase (use case) passed into the Session when creating Session (a module in the camera), for example, the photo return function (AdvancedCameraUsecase::ProcessDriverPartialCaptureResultCb), and the metadata meta data is returned to the CHI module through the method of the use case, so as to realize the mutual calling process between CamX and CHI.
[0097] In the embodiment of the present application, in the process of making the mobile phone output a billion-pixel image, first, a normal bringup operation is performed on the camera architecture camx, and then, the resolution size and other configurations of the billion-pixel are added, and the Bayer array remosaic processing is performed to enable it to take a billion-pixel picture, wherein the processing is as follows: Figure 3 Finally, check the rationality of various parameters in the billion-pixel configuration, and then verify whether the information in the captured images of each scene reaches the expected billion-pixel. Figure 4 As shown, Figure 4 The right side of the figure shows the shooting result in the prior art. Figure 4 The left side of the figure is the result of shooting after the application of the 100 million pixel output image processing. The most direct advantage of the 100 million pixel is that it can shoot higher resolution and output larger size images. A photo has a size of about 12000×9000 pixels, which is convenient for later cutting. Its application in the field of mobile phones has also greatly increased the selling point of mobile phones. For example, Figure 4 In the comparison of enlarged details, the 108M on the left has better detail processing, while the 12M on the right is almost blurred, which means that the 108M has more pixels, higher pixels, and stronger market competitiveness.
[0098] According to another aspect of the present application, a non-volatile storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions can be executed by a processor, the processor implements the method for generating billion-pixel images based on a mobile phone as described above.
[0099] According to another aspect of the present application, a device for generating a billion-pixel image based on a mobile phone is also provided, wherein the device comprises:
[0100] one or more processors;
[0101] A computer readable medium for storing one or more computer readable instructions,
[0102] When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the above-mentioned method for generating billion-pixel images based on a mobile phone.
[0103] Here, for the detailed contents of each embodiment of the device for generating billion-pixel images based on a mobile phone, please refer to the corresponding part of the embodiment of the method for generating billion-pixel images based on a mobile phone, which will not be repeated here.
[0104] To summarize, when the system of a mobile phone is started, the present application initializes all cameras supported by the mobile phone through the provider process of the camera in the mobile phone; in response to a user opening a camera application, the provider process obtains a target camera device and initializes the target camera device; configures the configuration information of the target camera device for outputting images of billions of pixels; in response to a shooting operation performed by the user in the camera application, the target camera device is triggered to take an image and rearrange the Bayer array for processing, so as to obtain a billion-pixel image taken by the target camera device; the billion-pixel image is displayed at the application layer of the mobile phone, thereby configuring the camera device in the mobile phone to output images of billions of pixels, so that the mobile phone can capture images with greater resolution and output larger sizes, thereby ensuring that the mobile phone can capture images with higher pixels and clearer images, further improving the selling point of the mobile phone in market competition.
[0105] It should be noted that the present application can be implemented in software and / or a combination of software and hardware, for example, can be implemented using an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of the present application (including relevant data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and similar devices. In addition, some steps or functions of the present application can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform each step or function.
[0106] In addition, a part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. The program instruction for calling the method of the present application may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-bearing medium, and / or stored in a working memory of a computer device that runs according to the program instruction. Here, according to an embodiment of the present application, a device is included, the device including a memory for storing computer program instructions and a processor for executing program instructions, wherein, when the computer program instruction is executed by the processor, the device is triggered to run the method and / or technical solution based on the aforementioned multiple embodiments according to the present application.
[0107] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
Claims
1. A method for generating a billion-pixel image based on a mobile phone, wherein: The method includes: When the system of the mobile phone is started, initialization operations are performed on all cameras supported by the mobile phone through the camera provider process in the mobile phone; In response to the user opening a camera application, obtaining a target camera device through the provider process, and performing an initialization operation on the target camera device; Configuring configuration information for outputting billion-pixel images to the target camera device; In response to a shooting operation performed by the user in the camera application, triggering the target camera device to take an image and rearrange the Bayer array for processing, so as to obtain a billion-pixel image taken by the target camera device; Displaying the billion-pixel image at the application layer of the mobile phone; Among them, configuring the configuration information of the billion-pixel image output of the target camera device includes: calling the create picture use case interface to obtain the camera device instance corresponding to the target camera device; notifying the camera service to call the configuration flow method and its configuration information of the billion-pixel image output through the camera application programming interface API; notifying the provider process through the HIDL interface in the configuration flow method to handle the configuration of the target camera device; in the provider process, passing the configuration information into the running module CamX-CHI through the called open method, and the running module CamX-CHI configures the configuration information of the billion-pixel image output of the target camera device.
2. The method according to claim 1, wherein: When the system of the mobile phone is started, all cameras supported by the mobile phone are initialized through the camera provider process in the mobile phone, including: When the system of the mobile phone is started, the provider process of the camera in the mobile phone starts to run and obtains the camera structure; Calling the camera quantity acquisition interface through the camera structure to obtain the number of cameras supported by the underlying layer; All cameras corresponding to the number of cameras supported by the mobile phone are initialized through the camera provider process in the mobile phone.
3. The method according to claim 2, wherein: In response to the user opening the camera application, obtaining the target camera device through the provider process and performing an initialization operation on the target camera device includes: In response to the user opening the application, calling the camera opening function in the camera management; Call the connect device method in the camera service; notifying the provider process by opening a camera device interface; Acquire the target camera device and its corresponding structure by calling an open method corresponding to the type in the acquired camera structure within the provider process; In the provider process, an initialization method of a structure corresponding to the target camera device is called to perform an initialization operation on the target camera device.
4. The method according to claim 3, wherein: The method of responding to the shooting operation performed by the user in the camera application, triggering the target camera device to take an image and rearrange the Bayer array for processing, so as to obtain a billion-pixel image taken by the target camera device, includes: In response to a shooting operation performed by the user in the camera application, triggering the target camera device to initiate a photo request; Send the photo request to the camera service through the camera application programming interface API by using the photo taking or re-sending request method of the camera device use case interface corresponding to the target camera device; Sending the photo request to a request thread within the camera service; sending the photo request to the provider process in the request thread; The provider process calls the photo request of the structure corresponding to the target camera device, and the running module CamX-CHI starts to perform Bayer array rearrangement processing at the HAL layer to obtain the billion-pixel image taken by the target camera device.
5. The method according to claim 4, wherein: The provider process calls the photo request of the structure corresponding to the target camera device, and the running module CamX-CHI starts to perform the Bayer array rearrangement processing at the HAL layer to obtain the billion-pixel image taken by the target camera device, including: When processing the photo request, if metadata is generated in the node Node, the metadata processing method in the node Node will be called to notify the subordinate pipeline Pipeline; The node Node internally calls the metadata processing method in the pipeline Pipeline; Each time a metadata processing method in the pipeline is called, the number of metadata processing methods is increased by 1, and it is determined whether the current number is equal to the number of nodes in the pipeline; If they are equal, the metadata request processing method is called to retrieve the metadata in the node Node and repackage it into a result data structure; The result data structure is passed as a parameter to the camera Session module; And in the camera Session module, the metadata in the pipeline is returned to the CHI module through a layer-by-layer calling method to obtain the billion-pixel image taken by the target camera device.
6. A non-volatile storage medium having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executable by a processor, the processor is enabled to implement the method according to any one of claims 1 to 5.
7. A device for generating billion-pixel images based on a mobile phone, wherein: The equipment includes: one or more processors; A computer readable medium for storing one or more computer readable instructions, When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Camera parameter initialization method and terminal
CN107391106A
Photographing method and electronic equipment
CN115696063A