Color acquisition method, electronic device, computer-readable storage medium, and program product

By combining a 3-channel camera and a multispectral camera for color sampling, and using a D65 standard light source and recognition algorithm to generate accurate color images, the problem of color selection errors for ordinary users under different light sources and cameras is solved, enabling convenient object color selection and measurement.

WO2026081651A1PCT designated stage Publication Date: 2026-04-23HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-08-15
Publication Date
2026-04-23

AI Technical Summary

Technical Problem

Ordinary users find it difficult to accurately select or measure the true color of an object, and existing technologies result in significant color errors due to differences in ambient light and camera photography.

Method used

It combines a 3-channel camera and a multispectral camera to capture images under D65 standard light source. By combining recognition algorithms and image processing technology, it generates accurate color images, supports users to select and edit color objects, and provides color appearance information under multiple light sources.

Benefits of technology

It enables non-contact and convenient object color selection and measurement, applicable to various scenarios, and improves the accuracy and convenience of color reproduction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025115215_23042026_PF_FP_ABST
    Figure CN2025115215_23042026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a color acquisition method, an electronic device, a computer-readable storage medium, and a program product. The color acquisition method comprises: in response to a color acquisition instruction, an electronic device displays a photographing preview interface; and in response to a first operation, the electronic device acquires a first color acquisition image, wherein the first color acquisition image comprises a color acquisition object, and the color appearance of the color acquisition object is the color appearance under a first preset light source. In the color acquisition method provided in the present application, a first color acquisition image is generated by photographing, so as to obtain the color appearance of a color acquisition object under a first preset light source, thereby realizing the presentation of a real color of the object under the first preset light source.
Need to check novelty before this filing date? Find Prior Art

Description

Color picking methods, electronic devices, computer-readable storage media and program products

[0001] This application claims priority to Chinese Patent Application No. 202411466398.8, filed on October 18, 2024, entitled "Color Picking Method, Electronic Device, Computer-Readable Storage Medium and Program Product", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of camera color sampling, specifically to a color sampling method, electronic device, computer-readable storage medium, and program product. Background Technology

[0003] In daily life, there are many situations where there is a need to select or measure the true color of an object. Ordinary users find it difficult to carry professional color pickers or other instruments to select or measure colors. Even if they use a camera to take pictures or videos and then compare them, the colors will not match due to different ambient light sources and color differences in camera or mobile phone photos, resulting in significant color differences.

[0004] Therefore, how to select or measure the true color of an object is a technical problem that needs to be solved. Summary of the Invention

[0005] This application provides a color sampling method, an electronic device, a computer-readable storage medium, and a program product. The color sampling method generates a first color sampling image by taking and processing an image, thereby obtaining the color appearance of the object under a first preset light source, and realizing the presentation of the true color of the object under the first preset light source.

[0006] In a first aspect, this application provides a color picking method, the method comprising: in response to a color picking instruction, an electronic device displays a shooting preview interface, wherein the color picking instruction is used to instruct the electronic device to enter a color picking mode and display the shooting preview interface; in response to a first operation, the electronic device acquires a first color picking image, the first color picking image including a color picking object, the color appearance of the color picking object being the color appearance under a first preset light source.

[0007] In this application, an electronic device can be used to sample the color of an object, so that the object appears as it does under a first preset light source, thus achieving color reproduction of the object under that light source. Specifically, this color sampling method not only helps in selecting a wide variety of colored goods and materials, but also in displaying more accurate color effects for banquets or stages. It can also help users with artistic needs to accurately sample the colors of landscapes or related materials on-site. Therefore, the color sampling method provided in this application achieves a non-contact color sampling solution, allowing color sampling without physical contact with the object, using photography to reproduce the object's color under the first preset light source. This helps users with color selection, display, or design.

[0008] In some possible implementations, the electronic device acquires the first color image, specifically including: the electronic device captures a first original image; and the electronic device generates the first color image based on the first original image.

[0009] In this implementation, the electronic device can obtain the first color image by taking a picture of the color-picking object, so that the color-picking function can be coupled to the shooting function of the electronic device, thereby improving the convenience of color picking.

[0010] In some possible implementations, the electronic device includes a first camera and a second camera. The first camera is a 3-channel camera, and the second camera has more than 3 channels. There are multiple first original images, at least one of which is captured by the first camera, and at least another of which is captured by the second camera.

[0011] In this implementation, since the first camera is a 3-channel camera and the second camera is a multispectral camera, the first original image captured by the first camera can provide a three-color channel image, and the first original image captured by the second camera can provide spectral information. Using the spectral information, the color appearance of the color-picking object under the first preset light source can be restored based on the three-color channel image, so that the electronic device can calculate and generate the first color-picking image through the first original image captured by the first camera and the first original image captured by the second camera.

[0012] In some possible implementations, the first preset light source is a D65 standard light source.

[0013] In this implementation, since the D65 standard light source has a stable color temperature, a high color rendering index, and spectral characteristics close to natural light, the color sampling method provided by this application presents the color appearance of the sampled object under the first preset light source. It can stably and accurately restore the original color appearance of the sampled object and is more universal, making the color sampling method of this application easier to apply to various scenarios.

[0014] In other possible implementations, the first preset light source can also be other standard light sources. For example, the first preset light source can also be a D50 standard light source, a D55 standard light source, a D75 standard light source, an F standard light source, an F (CWF) standard light source, an F7 standard light source, an A light source, a TL84 standard light source, a U30 (TL83) standard light source, a UV light source, etc. Specifically, the type of the first preset light source can be preset according to different application scenarios of electronic devices. For example, commercial displays may prefer to choose a TL84 standard light source or a CWF standard light source to simulate the lighting environment of a store. Therefore, using a TL84 standard light source or a CWF standard light source for color sampling is beneficial for color selection in commercial displays. As another example, home lighting may choose an F standard light source or a U30 standard light source to create a comfortable atmosphere. Therefore, using an F standard light source or a U30 standard light source for color sampling is beneficial for color selection in furniture matching or displays.

[0015] In some possible implementations, the shooting preview interface includes a color picker box. Before the electronic device acquires the first color picker image in response to the first operation, the method further includes: in response to a second operation by the user on the color picker box, the electronic device determines the color picker object.

[0016] In this implementation, the electronic device allows users to change the position of the color picker by dragging, and also allows users to change the size of the color picker by pinching or splitting two fingers. It's easy to understand that changing the position and size of the color picker allows the user to change the object they want to select. The second operation mentioned above can be changing the position of the color picker, and / or changing the size of the color picker. This second operation enables the selection of the color object, distinguishing it from the surrounding scene and facilitating subsequent color selection.

[0017] In this implementation, the second operation enables the selection of a color-picking object, distinguishing it from its surroundings and facilitating subsequent color picking. For example, after the electronic device selects a color-picking object, the area around the object is darker than the object itself, allowing for a clearer presentation of the object to the user.

[0018] In other possible implementations, electronic devices determine the color-picking object through a recognition algorithm, eliminating the need for user intervention. This makes the selection of the color-picking object faster and more efficient, thereby improving color-picking efficiency. The recognition algorithm can include object detection, salient subject detection, etc.

[0019] In some other possible implementations, the shooting preview interface includes a color picker box. Before the electronic device acquires the first color picker image in response to the first operation, the method further includes: the electronic device identifying the color picker object through a recognition algorithm; and the electronic device determining the color picker object in response to the user's second operation on the color picker box.

[0020] In this implementation, after the recognition algorithm automatically identifies the color picking object, the electronic device can allow the user to make further adjustments based on the color picking object selected by the recognition algorithm, such as adjusting the position and size of the color picking box, so as to adjust the selection of the color picking object. The electronic device can determine the color picking object after the user adjusts the color picking box.

[0021] In some possible implementations, the shooting preview interface includes a color picker box. Before the electronic device acquires the first color picker image in response to the first operation, the method further includes: the electronic device displaying prompt information to the user on the shooting preview interface through a recognition algorithm.

[0022] In this implementation, the recognition algorithm also detects in real time whether the electronic device is held steady and whether the shooting distance deviates from the shooting range. If it is found that the electronic device is not held steady or the shooting distance exceeds the preset shooting range, relevant user prompts will be displayed on the shooting preview interface (such as "Please hold the phone steady", "Shooting distance too close / too far", etc.) to prompt the user to hold the phone steady or change the shooting distance.

[0023] In some possible implementations, after the electronic device acquires the first color picker image, the method further includes: displaying the first color picker image; and in response to a third operation by the user on a first location of the color picker object, the electronic device displays color appearance information of the first location, the color appearance information including the RGB value of the color picker object at the first location.

[0024] In this implementation, displaying the color information of the first position via an electronic device makes it easy for the user to record the color information of the color sample object at the first position, facilitating recording and reference, and benefiting the user in subsequent color selection and design.

[0025] Users can click on any location within the color-picking object, and can click on multiple locations in succession. The electronic device will then display the corresponding color information for easy recording. This color information can be displayed directly at the clicked location, or it can be automatically organized into a document after the user clicks. For example, the color information at the clicked location can be automatically copied to the clipboard, where the user can paste it into any text input box on the electronic device. As an example, the pasted information might appear as "First Location - Color Information 1, Second Location - Color Information 2,...". The naming of the locations can be edited by the user for better recording. For example, the first location can be changed to the center of the color-picking object, and the second location to the edge of the color-picking object.

[0026] In some possible implementations, after the electronic device acquires the first color sample image, the method further includes: the electronic device storing the color appearance information of the color sampled object under the first preset light source into the exchangeable image file information of the first color sample image.

[0027] In this implementation, the color appearance information of the color-picking object under the first preset light source is stored in the exchangeable image file (exif) information of the first color-picking image to facilitate the viewing and editing of the first color-picking object, which contains the color appearance information of the color-picking object at various locations.

[0028] In some possible implementations, after the electronic device acquires the first color sample image, the method further includes: the electronic device storing color correction matrix information and lookup table information for matching color gamut display into the exchangeable image file information of the first color sample image.

[0029] In this implementation, the EXIF ​​information also includes Color Correction Matrix (CCM) information and Look-Up Table (LUT) information, so that after the first color sample image is shared or shared with other electronic devices, it can be matched and displayed according to the color gamut of the screen of other electronic devices.

[0030] In some possible implementations, after the electronic device acquires the first color image, the method further includes: in response to the fourth operation, the electronic device acquires a second color image, wherein the color appearance of the color object in the second color image is the color appearance under a second preset light source.

[0031] In this implementation, the fourth operation may include editing the first color-picking image to enable the electronic device to acquire the second color-picking image. By designing the second preset light source to be another standard light source, it is easier to apply it to specific scenarios. For example, the second preset light source may be a D50 standard light source, a D55 standard light source, a D75 standard light source, an F standard light source, an F (CWF) standard light source, an F7 standard light source, an A light source, a TL84 standard light source, a U30 (TL83) standard light source, a UV light source, etc. Specifically, the type of the second preset light source can be preset according to different application scenarios of the electronic device. When the color appearance information under the second preset light source is more convenient than the color appearance information under the first preset light source in these application scenarios, the first color-picking image can be edited to obtain the second color-picking image. For example, commercial displays may prefer to choose TL84 or CWF standard light sources to simulate the lighting environment of a store. Therefore, using TL84 or CWF standard light sources for color sampling in the second preset light source is beneficial for color selection in commercial displays. On the other hand, home lighting may choose F or U30 standard light sources to create a comfortable atmosphere. Therefore, using F or U30 standard light sources for color sampling in the second preset light source is beneficial for color selection in furniture matching or displays.

[0032] In some possible implementations, the electronic device acquires the second color image, specifically including: generating the second color image based on the first color image and a first mapping relationship, wherein the first mapping relationship is the mapping relationship between the spectrum captured under a first preset light source and the spectrum captured under a second preset light source.

[0033] In this implementation, the first color-picking image can be converted through a first mapping relationship to obtain the color appearance of the color-picking object under a second preset light source. This helps to broaden the application scenarios of color picking in electronic devices, thereby improving the user experience. Users can open the first color-picking image in the gallery and edit it through a tab in the first color-picking image to generate a second color-picking image, thus obtaining the color appearance of the color-picking object under the second preset light source. The second color-picking image can directly overwrite the first color-picking image, or it can be saved as a new image. After obtaining the second color-picking image, users can further click on the color-picking object within it to obtain the color appearance information (e.g., RGB values) of the object at different locations, facilitating user review and recording.

[0034] In some other possible implementations, the electronic device may also generate a second color image based on a third mapping relationship.

[0035] In this implementation, after generating the first color-picking image, the electronic device allows users to view and edit the first color-picking image in their gallery. When the user selects to edit and convert the color appearance of the color-picking object under the second preset light source, the electronic device can convert the first color-picking image through a third mapping relationship to obtain the color appearance of the color-picking object under the second preset light source. This helps to broaden the application scenarios of color picking by the electronic device, thereby improving the user experience.

[0036] In some possible implementations, the color picker command includes: operations on the color picker icon, which is the icon for activating color picker mode, or the color picker icon is the icon of the color picker application.

[0037] In some possible implementations, the electronic device has a first application installed, and the shooting preview interface is provided by the first application.

[0038] The preview interface of the first application may include a color picker icon. The electronic device may allow the user to click the color picker icon to enter the color picker mode and display a color picker box so that the user can select the color object by operating the color picker box.

[0039] In this implementation, the first application can be a camera. Users can click on the camera in the application's display interface of the electronic device to enter the shooting preview interface through the camera's preview interface, thereby achieving quick access to the shooting preview interface, which conforms to the user's habitual use of electronic devices.

[0040] In other possible implementations, the electronic device also has a second application installed, and the shooting preview interface is displayed by the second application calling the first application. The color picker icon is the icon of the second application.

[0041] In this implementation, the second application can be a color-picking application. The electronic device can integrate the color-picking function into the second application. By clicking the second application, users can directly enter the shooting preview interface and bring up the color-picking box to enter the color-picking mode. Furthermore, after the second application is launched, it can call the API interface of the first application, allowing users to access the camera function of the first application simply by clicking the second application.

[0042] In some possible implementations, the electronic device includes a first camera, a second camera, and a flash. The first camera is a 3-channel camera, and the second camera has more than 3 channels. The acquisition of the first color image by the electronic device further includes: the electronic device capturing m first images and n second images, where m ≥ 1 and n ≥ 1, wherein the first images are captured by the electronic device using the first camera with the flash off, and the second images are captured by the electronic device using the second camera with the flash off; the electronic device capturing s third images and t fourth images, where s ≥ 1 and t ≥ 1, wherein the third images are captured by the electronic device using the first camera with the flash on, and the fourth images are captured by the electronic device using the second camera with the flash on; the electronic device obtains a fifth image based on the first and third images; the electronic device obtains image preprocessing parameters based on the second and fourth images; and the electronic device obtains the first color image based on the fifth image and the image preprocessing parameters.

[0043] In this implementation, a first color image is obtained by taking a set of images with the first camera and the second camera before and after the flash is turned on. This allows us to obtain the true color appearance of the object under the first preset light source. No special design is required for the first camera, the second camera, and the flash, which reduces the difficulty of color picking using electronic devices with shooting functions and improves the efficiency of color picking.

[0044] During the shooting process of the first and second cameras, the first and second cameras are synchronized in time so that the generation of the first and second images is synchronized in time. At this time, the AE algorithm controls the brightness alignment of the time-aligned first and second images to ensure that the brightness of the images captured by the first and second cameras is consistent.

[0045] When the number of first and third images is 1, noise reduction is performed on the first and third images respectively. Then, brightness alignment, global registration, and brightness normalization are performed on the first and third images in sequence. The difference between the third image and the first image is calculated, and lens shadow correction is performed on the image obtained by the difference. The white balance (Auto White Balance, AWB) algorithm on the preview stream ISP is removed, that is, inverse white balance (inverse AWB) is performed in sequence to obtain the fifth image, so that the fifth image is a three-color channel image without color restoration.

[0046] By subtracting the third image from the first image, interference from ambient light can be eliminated, so that the fifth image is a three-color channel image of the color sampled by the first camera under the flash.

[0047] When there are multiple first images, one of them needs to be selected as the first reference frame, and noise reduction processing is performed on the first reference frame based on the remaining first images. The first reference frame can be selected from the first image with the best shooting effect to improve the noise reduction performance.

[0048] When there are multiple second images, one of them needs to be selected as the second reference frame, and noise reduction processing is performed on the second reference frame based on the remaining second images. The second reference frame can be selected from the second images with better shooting results to improve the noise reduction effect.

[0049] In this process, when both the second and fourth images have a quantity of 1, noise reduction is performed on both images. Then, brightness alignment, global registration, and brightness normalization are sequentially applied to both images. The difference between the fourth and second images is then calculated, and lens shading correction is applied to the resulting image to obtain the sixth image. The first and second parameters can then be calculated from this sixth image. The first parameter is the AWB parameter, and the second parameter is the Color Correction (CC) parameter.

[0050] Among them, since the fourth and second images are subtracted, the interference of ambient light can be eliminated, so that the sixth image is a multispectral image under the flash.

[0051] When there are multiple second images, one of them needs to be selected as the third reference frame, and noise reduction processing is performed on the third reference frame based on the remaining second images. The third reference frame can be selected from the second images with better shooting results to improve the noise reduction effect.

[0052] When there are multiple fourth images, one of them needs to be selected as the fourth reference frame, and noise reduction processing is performed on the fourth reference frame based on the remaining fourth images. The fourth reference frame can be selected from the fourth images with better shooting results to improve the noise reduction effect.

[0053] In some possible implementations, the electronic device captures s third images and t fourth images, specifically including: the electronic device obtains second exposure parameters based on a first brightness relationship and first exposure parameters of the first image, and captures the third image based on the second exposure parameters; the electronic device obtains fourth exposure parameters based on the second brightness relationship and third exposure parameters of the second image, and captures the fourth image based on the fourth exposure parameters, wherein the first brightness relationship is the brightness relationship of the first camera with the flash on and off at a first brightness level, and the second brightness relationship is the brightness relationship of the second camera with the flash on and off at a first brightness level.

[0054] In this implementation, exposure parameters (e.g., aperture, exposure time, ISO, and exposure bias) are adjusted using a first brightness relationship to ensure that the brightness of the image output from the first camera when the flash is on is consistent with the brightness when the flash is off. This helps to guarantee consistent image brightness and avoids an increase in image brightness due to the flash being on. Similarly, exposure parameters (e.g., aperture, exposure time, ISO, and exposure bias) are adjusted using a second brightness relationship to ensure that the brightness of the image output from the second camera when the flash is on is consistent with the brightness when the flash is off. This also helps to guarantee consistent image brightness and avoids an increase in image brightness due to the flash being on.

[0055] In some possible implementations, the first camera focuses at the same position when capturing the first and third images; the second camera focuses at the same position when capturing the second and fourth images.

[0056] In this implementation, the first camera maintains the same focus position when capturing the first and third images to ensure that the focus remains fixed during color extraction, which is beneficial for color accuracy. Similarly, the second camera maintains the same focus position when capturing the second and fourth images to ensure that the focus remains fixed during color extraction, which is also beneficial for color accuracy.

[0057] In a second aspect, this application provides an electronic device comprising: one or more processors; one or more memories; and one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions that, when executed by the one or more processors, cause the electronic device to perform any of the methods described above.

[0058] Thirdly, this application provides a computer-readable storage medium storing a program or instructions that, when executed, implement any of the methods described above.

[0059] Fourthly, this application provides a computer program product that stores a program or instructions that, when executed, implement any of the methods described above. Attached Figure Description

[0060] Figure 1 is a schematic diagram of the hardware structure of the electronic device provided in this application in some embodiments;

[0061] Figure 2 is a schematic diagram of the software architecture of the electronic device shown in Figure 1 in some embodiments;

[0062] Figure 3 is a schematic diagram of the electronic device shown in Figure 1 opening the first application in some embodiments;

[0063] Figure 4 is a schematic diagram of the preview interface of the first application of the electronic device in Figure 3 in some embodiments;

[0064] Figure 5 is a schematic diagram of the tabs in the preview interface of the first application of the electronic device shown in Figure 4 in some embodiments;

[0065] Figure 6 is a schematic diagram of the user interface involved when the user selects a color object in the color picking mode of the electronic device shown in Figure 4;

[0066] Figure 7 is a schematic diagram of the electronic device shown in Figure 1 opening a second application in some embodiments;

[0067] Figure 8 is a schematic diagram of the interface of the electronic device shown in Figure 6 after the color picker object is determined.

[0068] Figure 9 is a schematic diagram of the arrangement of the camera and flash in some embodiments of the electronic device shown in Figure 1;

[0069] Figure 10 is a schematic diagram of the electronic device shown in Figure 9 taking a picture using a camera and flash;

[0070] Figure 11 is a schematic diagram of generating the first color image based on the color sampling process shown in Figure 10;

[0071] Figure 12 is a schematic diagram of the first color image generated according to the color sampling process shown in Figure 11;

[0072] Figure 13 is a schematic diagram of the first color picker image generated by the color picking process shown in Figure 11 in the gallery interface;

[0073] Figure 14 is a detailed flowchart of a color picking method provided in an embodiment of this application;

[0074] Figure 15 is a schematic diagram of the specific process of the color picking method shown in Figure 14. Detailed Implementation

[0075] The technical solutions of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments.

[0076] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "plural" or "multiple" refers to two or more than two.

[0077] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.

[0078] The terminology used in the following embodiments is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to also include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one” and “one or more” refer to one, two, or more than two. The term “and / or” is used to describe the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can indicate: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character “ / ” generally indicates that the preceding and following related objects are in an “or” relationship.

[0079] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "one embodiment," "some embodiments," "another embodiment," "other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0080] This application provides a color sampling method that can be applied to electronic devices with shooting capabilities. For example, it can be applied to mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), smart home devices, and other electronic devices. This application does not limit the specific type of electronic device.

[0081] The structure of the electronic device provided in the embodiments of this application will be described next.

[0082] Please refer to Figure 1, which is a schematic diagram of the hardware structure of the electronic device 100 provided in this application in some embodiments.

[0083] In some embodiments, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a flash 194, a display screen 195, and a subscriber identification module (SIM) card interface 196, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0084] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0085] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0086] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0087] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0088] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0089] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.

[0090] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0091] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0092] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 195, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

[0093] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0094] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0095] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0096] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 195. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.

[0097] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0098] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. Wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. GNSS can include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0099] Electronic device 100 implements display functions through a GPU, a display screen 195, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 195 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0100] The display screen 195 is used to display images, videos, etc. The display screen 195 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 195, where N is a positive integer greater than 1.

[0101] Electronic device 100 can perform shooting functions through ISP, camera 193, flash 194, video codec, GPU, display screen 195 and application processor.

[0102] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin color. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0103] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0104] The flash unit 194 provides additional illumination when the camera 193 is shooting. In low-light environments, such as at night or in dimly lit indoor spaces, the flash unit can provide extra illumination to the shooting scene, allowing the camera 193 to capture more detail and avoid blurry or noisy photos due to insufficient light. For example, when shooting people at night, the flash unit can illuminate their faces, making facial features clearer and skin colors more natural. Furthermore, by providing appropriate flash with the flash unit 194, the camera 193 can help more accurately reproduce the colors of the subject. In low-light conditions, the colors of objects may be distorted due to insufficient light, while the flash unit 194 can provide more even light, resulting in richer and more realistic colors. For example, when shooting a red apple, the flash unit 194 can make the apple's red more vibrant, rather than a dull, dark red.

[0105] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.

[0106] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0107] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0108] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0109] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0110] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0111] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0112] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.

[0113] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.

[0114] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.

[0115] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.

[0116] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.

[0117] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can be corresponding to touch operations applied to different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations applied to different areas of the display screen 195. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.

[0118] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.

[0119] The SIM card interface 196 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 196 to make contact with and separate from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 196 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 196 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 196 is also compatible with different types of SIM cards. The SIM card interface 196 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 100 uses an embedded SIM (eSIM) card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0120] It should be understood that the phone cards in the embodiments of this application include, but are not limited to, SIM cards, eSIM cards, universal subscriber identity modules (USIM), universal integrated circuit cards (UICC), etc.

[0121] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. For example, a layered architecture software system can be the Android system, the Harmony operating system (OS), or other software systems. This application embodiment uses the layered architecture Android system as an example to illustrate the software structure of electronic device 100.

[0122] Please refer to Figure 2, which is a schematic diagram of the software architecture of the electronic device 100 shown in Figure 1 in some embodiments.

[0123] In some embodiments, the layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer. The application layer may include a series of application packages.

[0124] As shown in Figure 2, the application package may include applications such as camera, gallery, color picker, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0125] The camera application can be used to capture photos, record videos, etc., and the generated photos and videos can be viewed and edited in the gallery. For example, after the camera application is launched, the camera is activated and a shooting preview interface is displayed on the electronic device's screen. This shooting preview interface may include function tabs for the user to select, adjust the subject in the shooting preview, and then take the picture.

[0126] Among them, the color picker application can be used to pick colors and generate color picker images that have the original color appearance of the color picker object. The generated color picker images can be viewed and edited in the gallery.

[0127] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0128] As shown in Figure 2, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0129] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0130] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, and more.

[0131] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0132] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).

[0133] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0134] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0135] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0136] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0137] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0138] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0139] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0140] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0141] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0142] A 2D graphics engine is a graphics engine for 2D drawing.

[0143] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0144] The following describes an embodiment of this application that utilizes an electronic device for color sampling.

[0145] Please refer to Figures 3 to 6. Figure 3 is a schematic diagram of opening the first application in some embodiments of the electronic device shown in Figure 1; Figure 4 is a schematic diagram of the preview interface of the first application in some embodiments of the electronic device shown in Figure 3; Figure 5 is a schematic diagram of the tabs in the preview interface of the first application in some embodiments of the electronic device shown in Figure 4; Figure 6 is a schematic diagram of the user interface involved when the user selects a color object in the color picking mode of the electronic device shown in Figure 4.

[0146] In some embodiments, the electronic device may have a first application installed, and the shooting preview interface may be provided by the first application. The first application may be a camera. In this embodiment, the user can click on the camera in the application's display interface of the electronic device to enter the shooting preview interface through the camera's preview interface, thus achieving quick access to the shooting preview interface, which conforms to the user's habitual use of electronic devices.

[0147] In some examples, the shooting preview interface may include a color picker icon. That is, the color picker icon can be directly integrated into the bottom function options of the camera's preview interface (see Figure 4). By clicking the color picker icon, you can enter the color picker mode (see Figure 6) and bring up the color picker box.

[0148] In other examples, the color picker icon can be integrated into the more options section at the bottom of the camera's preview interface. That is, compared to the interface shown in Figure 4, the color picker icon is not directly displayed. You need to click the more icon to open the tab (see Figure 5). By clicking the color picker icon in the tab, you can enter the color picker mode (see Figure 6) and bring up the color picker box.

[0149] It should be noted that, in this embodiment, the color picker icon is the icon for activating the color picker mode. The color picker icon can be, but is not limited to, one or more of text, patterns, and letters. The color picker icon provided in the accompanying drawings of this embodiment is for illustrative purposes only and does not limit the color picker icon.

[0150] It should be noted that in this embodiment, clicking the camera icon leads to the camera's preview interface. The modes in this interface are those of the camera's own functions (e.g., photo mode, portrait mode, etc.). Entering color picking mode requires clicking the color picking option within the camera's preview interface. In other embodiments, the electronic device can set the default mode when the camera starts to color picking mode, so that clicking the camera icon directly leads to the preview interface of color picking mode (i.e., the interface shown in Figure 6), enabling quick access to color picking mode. In other embodiments, the electronic device can set the camera's startup mode to memory mode, meaning the mode entered when the camera starts is the mode used the last time the camera was used, facilitating multiple color picking attempts by the user.

[0151] Please refer to Figures 6 and 7. Figure 7 is a schematic diagram of the electronic device shown in Figure 1 opening a second application in some embodiments.

[0152] In some embodiments, the electronic device may further include a second application, and the shooting preview interface may be displayed by the second application calling the first application. The second application may be a color-picking application.

[0153] In this embodiment, the electronic device can integrate the color picking function into a second application. By clicking the second application, users can directly enter the shooting preview interface and bring up the color picking box to enter the color picking mode (as shown in Figure 6). Furthermore, after the second application is launched, it can call the API interface of the first application, allowing users to access the shooting function of the first application simply by clicking the second application.

[0154] It should be noted that the icon of the second application in Figure 7 is a color picker icon, and its appearance is only for illustration and does not limit the appearance of the icon of the second application. In other embodiments, the second application may also be an icon of other styles.

[0155] Please refer to Figures 6 and 8. Figure 8 is a schematic diagram of the interface of the electronic device shown in Figure 6 after the color picker object is determined.

[0156] In some embodiments, in color picking mode, the shooting preview interface may include a color picking frame. The electronic device can determine the color picking object through the color picking frame, thereby improving the accuracy of the color picking object selection and reducing the amount of calculation for color picking.

[0157] The shooting preview interface can be an interface provided by the first or second application of the electronic device. This interface can be used to preview the object that the user wants to shoot, such as the color picker object mentioned above.

[0158] In the shooting preview interface, all objects can be color pickers. There can be one or more color pickers. The electronic device can support the user to select one or more color pickers, thereby further realizing the color picking of the selected color picker.

[0159] In some examples, electronic devices can allow users to change the position of the color picker by dragging, and also allow users to change the size of the color picker by pinching or splitting two fingers. It's easy to understand that changing the position and size of the color picker changes the object the user wants to select. This second operation enables the selection of the color picker object, distinguishing it from the surrounding scene and facilitating subsequent color selection. For example, referring to Figure 8, after the electronic device selects a color picker object, the area around the object is darker than the object itself, making the object clearer for the user.

[0160] In other examples, electronic devices can also automatically determine the color-picking object through recognition algorithms, without requiring user intervention, making the selection of the color-picking object faster and more efficient, thereby improving color-picking efficiency. These recognition algorithms can include object detection, salient subject detection, and other similar algorithms.

[0161] For example, the recognition algorithm can be determined by the user's selection operation by the electronic device. For instance, when the user sets the artificial intelligence function to be enabled (such as the master AI function) when picking colors, the recognition algorithm will run automatically in the background of the electronic device to automatically select the color object.

[0162] In some examples, after the recognition algorithm automatically identifies the color-picking object, the electronic device can support the user's default selection of the color-picking object, and the electronic device determines the color-picking object and continues to pick colors.

[0163] In other examples, after the recognition algorithm automatically identifies the color-picking object, the electronic device can also allow the user to make further adjustments based on the color-picking object identified by the recognition algorithm, such as adjusting the position and size of the color-picking box, in order to adjust the selection of the color-picking object.

[0164] In some embodiments, the recognition algorithm can also support the electronic device to display prompts to the user on the shooting preview interface to assist the user in color selection and improve the user experience.

[0165] For example, before the electronic device determines the color picking object, the electronic device can use a recognition algorithm to display prompts for the user about the color picking frame on the shooting preview interface (e.g., "Please select the color picking object", "Please operate the color picking frame", etc.) to remind the user to operate the color picking frame.

[0166] For example, during the color picking process, the recognition algorithm will also detect in real time whether the electronic device is held steady and whether the shooting distance deviates from the optimal shooting range. If it is found that the electronic device is not held steady or the shooting distance exceeds the preset shooting range, relevant prompts will be displayed on the shooting preview interface (such as "Please hold the phone steady", "Shooting distance too close / too far", etc.) to prompt the user to hold the phone steady or change the shooting distance.

[0167] It should be noted that before the electronic device acquires the first color image, in order to achieve more stable color acquisition, even if the electronic device is held steady and the shooting distance is within the preset shooting range, the electronic device can still display some other prompts to the user on the shooting preview interface (such as "Color acquisition in progress, please remain still", "Shooting in progress, please hold steady", etc.) to remind the user to keep the electronic device steady and prevent the electronic device from shaking and affecting color acquisition.

[0168] Please refer to Figures 8 to 10. Figure 9 is a schematic diagram of the arrangement of the camera and flash in some embodiments of the electronic device shown in Figure 1; Figure 10 is a schematic diagram of the electronic device shown in Figure 9 taking pictures using the camera and flash.

[0169] In some embodiments, the camera may include a first camera 1931 and a second camera 1932. A flash 194 may be disposed adjacent to the first camera 1931, and the flash 194 may be disposed adjacent to the second camera 1932. The first camera 1931 may be a 3-channel camera, such as an RGB camera or an RYB camera. The second camera 1932 may be a multispectral camera with more than 3 color channels.

[0170] For example, when the electronic device enters the color picking mode, the first camera 1931 and the second camera 1932 can start working simultaneously. At this time, the automatic exposure (AE) algorithm and the automatic focus (AF) algorithm on the preview path will converge the brightness and focus until the shooting preview interface is stable, so that the display of the color picking object in the shooting preview interface is clear and stable.

[0171] At this point, the electronic device can identify the color to be picked using the color picker, and the user can start picking colors by clicking the shutter button.

[0172] In some examples, the shooting preview interface may include a shooting button, which users can click to start color picking.

[0173] In other examples, users can also tap a button 190 located on the side of the electronic device to begin color picking. This can be done by tapping the volume control buttons on button 190, or by tapping a separate shutter button on button 190.

[0174] The flowchart shown in Figure 10 illustrates that at time T0, the electronic device can respond to the first operation and begin capturing colors. This first operation may include the user clicking the capture button.

[0175] The flash is kept off. During the shooting process of the first and second cameras, the first and second cameras are synchronized in time so that the generation of the first and second images is synchronized. At this time, the AE algorithm controls the brightness alignment of the time-aligned first and second images to ensure that the brightness of the images captured by the first and second cameras is consistent.

[0176] It should be noted that since multispectral cameras generally receive less light than 3-channel cameras, the exposure time for the second camera will be longer, therefore m will generally be greater than n. Here, both m and n can also be 1.

[0177] After generating m first images and n second images, the flash is switched from off to on. No user intervention is required at this point, and the electronic device takes another picture at time T1. Since the flash activation changes the amount of light entering the first and second cameras, the AE algorithm adjusts accordingly during the second picture capture.

[0178] Specifically, by adjusting exposure parameters (e.g., aperture number, exposure time, ISO, exposure offset value) through the first brightness relationship, the output brightness of the first camera after the flash is turned on is consistent with the output brightness when the flash is turned off. This helps to ensure the consistency of output brightness and avoids the increase in output brightness caused by turning on the flash.

[0179] The first brightness relationship can be stored in the memory of the electronic device so that the AE algorithm can call the first brightness relationship to adjust the exposure parameters after the flash is turned on during the color picking process.

[0180] Specifically, at a first brightness level, the algorithm records the first exposure parameters of the image captured by the first camera when the flash is off, and the second exposure parameters of the image captured by the first camera at the same brightness when the flash is on. These first and second exposure parameters are then linked to form a mapping relationship. Similarly, by adjusting the first brightness and recording multiple times, a mapping table is created, thus establishing the first brightness relationship. Therefore, when the first camera captures an image after the flash is on, the AE algorithm can calculate the mapped second exposure parameters based on the first exposure parameters of the first image within the first brightness relationship. This allows the electronic device to capture a third image based on the second exposure parameters, ensuring that the brightness of the third image matches that of the first image.

[0181] In this design, the first camera focuses at the same position when capturing the first and third images to ensure that the focus of the first camera remains fixed during the color sampling process, which is beneficial to the accuracy of color sampling.

[0182] Similarly, by adjusting exposure parameters (e.g., aperture number, exposure time, ISO, exposure offset value) through the second brightness relationship, the output brightness of the second camera after the flash is turned on is consistent with the output brightness when the flash is turned off. This helps to ensure the consistency of output brightness and avoids the increase in output brightness caused by turning on the flash.

[0183] The second brightness relationship can be stored in the memory of the electronic device so that the AE algorithm can call the second brightness relationship to adjust the exposure parameters after the flash is turned on during the color picking process.

[0184] Specifically, at the first brightness level, the third exposure parameter of the image captured by the second camera when the flash is off, and the fourth exposure parameter of the image captured by the second camera at the same brightness when the flash is on, are recorded. These third and fourth exposure parameters are then linked to form a mapping relationship. Similarly, by adjusting the first brightness and recording multiple times, a mapping table is formed, thus creating the second brightness relationship. Therefore, when the second camera captures a picture after the flash is on, the AE algorithm can calculate the mapped fourth exposure parameter based on the third exposure parameter of the second image within the second brightness relationship. This allows the electronic device to capture a fourth image based on the fourth exposure parameter, ensuring that the brightness of the fourth image matches that of the second image.

[0185] In this design, the second camera focuses at the same position when capturing the second and fourth images to ensure that the focus of the second camera remains fixed during the color sampling process, which is beneficial to the accuracy of color sampling.

[0186] It should be noted that in this embodiment, the flash is shown to be turned off and then on during the color picking process. It can be understood that in some other embodiments, the flash may be turned on and then off during the color picking process.

[0187] The first image, second image, third image, and fourth image are obtained through the above steps. These images are then used as inputs for color sampling to calculate the first color sampling image. The color appearance of the first color sampling image is the color appearance under a first preset light source.

[0188] Specifically, please refer to Figures 11 and 12. Figure 11 is a schematic diagram of generating the first color image from the image obtained according to the color sampling process shown in Figure 10; Figure 12 is a schematic diagram of generating the first color image according to the color sampling process shown in Figure 11.

[0189] In some embodiments, the electronic device obtains a fifth image based on the first and third images, and the electronic device obtains image preprocessing parameters based on the second and fourth images.

[0190] For example, when the number of the first image and the third image is 1, the first image and the third image are denoised respectively. Then, the first image and the third image are luminance aligned, globally registered and luminance normalized in sequence. The difference between the third image and the first image is calculated. Then, the image obtained by the difference is corrected for lens shadow and the white balance (Auto White Balance, AWB) algorithm on the preview stream ISP is removed. That is, the inverse white balance (inverse AWB) is performed in sequence to obtain the fifth image, so that the fifth image is a three-color channel image without color reproduction.

[0191] In this embodiment, by subtracting the third image from the first image, the interference of ambient light can be eliminated, so that the fifth image is a three-color channel map of the color sampled object captured by the first camera under the flash.

[0192] It should be noted that when there are multiple first images, one of them needs to be selected as the first reference frame, and noise reduction processing is performed on the first reference frame based on the remaining first images. The first reference frame can be selected from the first image with the best shooting effect to improve the noise reduction performance.

[0193] It should be noted that when there are multiple second images, one of them needs to be selected as the second reference frame, and noise reduction processing is performed on the second reference frame based on the remaining second images. The second reference frame can be selected from the second images with better shooting results to improve the noise reduction effect.

[0194] It should be noted that the method of noise reduction is not limited in the embodiments of this application. Noise reduction can be performed by smoothing noise reduction, edge noise reduction, frequency-wise noise reduction, etc.

[0195] For example, when both the second and fourth images have a quantity of 1, noise reduction is performed on the second and fourth images respectively. Then, brightness alignment, global registration, and brightness normalization are performed on the second and fourth images sequentially. The difference between the fourth and second images is then calculated, and lens shading correction is applied to the resulting image to obtain the sixth image. The image preprocessing parameters can be obtained from the sixth image. These preprocessing parameters may include AWB parameters and / or Color Correction (CC) parameters.

[0196] In this embodiment, since the fourth image and the second image are subtracted, the interference of ambient light can be eliminated, so that the sixth image is a multispectral image under the flash.

[0197] It should be noted that when there are multiple second images, one of them needs to be selected as the third reference frame, and noise reduction processing is performed on the third reference frame based on the remaining second images. The third reference frame can be selected from the second images with better shooting results to improve the noise reduction effect.

[0198] It should be noted that when there are multiple fourth images, one of them needs to be selected as the fourth reference frame, and noise reduction processing is performed on the fourth reference frame based on the remaining fourth images. The fourth reference frame can be selected from the fourth image with the best shooting effect to improve the noise reduction performance.

[0199] In some embodiments, the electronic device obtains a first color sample image based on a fifth image and image preprocessing parameters.

[0200] In this embodiment, by taking a set of images before and after the flash is turned on using the first camera and the second camera respectively, a first color image can be obtained, thereby obtaining the true color appearance of the color object under the first preset light source. No special design is required for the first camera, the second camera and the flash, which reduces the difficulty of color picking using electronic devices with shooting functions and improves the efficiency of color picking.

[0201] For example, the electronic device can obtain the third and fourth parameters based on the first parameter, the second parameter, and the second mapping relationship, so that the electronic device can apply the third and fourth parameters to the fifth image to obtain the first color sampling image.

[0202] The second mapping relationship, also known as the second mapping matrix, can be stored in the memory of the electronic device. The electronic device can calculate the third and fourth parameters based on the first and second parameters by calling the second mapping relationship. The first parameter can be the CC parameter in the image preprocessing parameters of the sixth image, and the second parameter can be the AWB parameter in the image preprocessing parameters of the sixth image.

[0203] In this embodiment, under a light source with only a flash, the first spectrum of the color chart is recorded. Under a first preset light source, the second spectrum of the color chart is recorded. A mapping relationship is formed by linking the first information in the first spectrum and the second information in the second spectrum corresponding to the same color in the color chart, thus forming the aforementioned second mapping relationship. The first information includes AWB parameters and CC parameters, and the second information also includes AWB parameters and CC parameters. Therefore, in this embodiment, based on the image preprocessing parameters of the sixth image, the third and fourth parameters corresponding to the first preset light source can be obtained by calling the second mapping relationship. The third parameter is the AWB parameter of the color sampling object captured under the first preset light source, and the fourth parameter is the CC parameter of the color sampling object captured under the first preset light source. Thus, applying the third and fourth parameters to the fifth image can obtain the first color sampling image, and the color appearance of the first color sampling image is the color appearance under the first preset light source.

[0204] It should be noted that when the third and fourth parameters are applied to the fifth image, the image is still in the standard color space. The electronic device can convert the image to the color space corresponding to the display screen's color gamut using a Color Correction Matrix (CCM) and a Look-Up Table (LUT). For example, if the electronic device's display screen is in the P3 color gamut, the electronic device will convert the image after applying the third and fourth parameters to the fifth image to the P3 color gamut and display the first color sample image.

[0205] In the process of calculating the second mapping relationship, the second camera and the flash can also be calibrated to reduce the differences between the second camera and the standard multispectral camera, as well as the differences between the flash and the standard flash.

[0206] Specifically, under the light source of only a standard flash, the third spectrum of the color chart captured by the standard multispectral camera is recorded. Under the light source of only the first preset light source, the fourth spectrum of the color chart captured by the standard multispectral camera is recorded. By linking the third information in the third spectrum and the fourth information in the fourth spectrum corresponding to the same color in the color chart to form a mapping relationship, a first sub-mapping relationship is formed.

[0207] Under a standard flash light source, the fifth spectrum of the color chart captured by a standard multispectral camera is recorded. Under a flash light source, the sixth spectrum of the color chart captured by the same standard multispectral camera is also recorded. By linking the fifth information in the fifth spectrum and the sixth information in the sixth spectrum corresponding to the same color on the color chart, a mapping relationship is formed, thus creating a second sub-mapping relationship. This second sub-mapping relationship can be used for flash calibration and correction.

[0208] Under a standard flash light source, the seventh spectrum of the color chart captured by a standard multispectral camera is recorded. Under the same light source, the eighth spectrum of the color chart captured by a second camera is recorded. A mapping relationship is formed by linking the seventh information in the seventh spectrum and the eighth information in the eighth spectrum corresponding to the same color on the color chart, thus creating a third sub-mapping relationship. This third sub-mapping relationship can be used to calibrate and correct the second camera.

[0209] Therefore, the second camera and flash can be calibrated and corrected based on the second and third sub-mapping relationships, thereby correcting the first and second parameters. Then, the corrected first and second parameters are substituted into the first sub-mapping relationship to calculate the AWB and CC parameters of the color sampled object captured by the standard multispectral camera under the first preset light source. In other words, the second mapping relationship can be calculated based on the first, second, and third sub-mapping matrices.

[0210] Please refer to Figures 11 to 13. Figure 13 is a schematic diagram of the first color picker image generated by the color picking process shown in Figure 11 in the gallery interface.

[0211] In some embodiments, the first color image can be edited after the electronic device generates the first color image.

[0212] For example, an electronic device can allow a user to select any location on the color sample object to display color information at the selected location, so that the user can view and record it.

[0213] It should be noted that users can click on any location of the color-picking object, and can click on multiple locations in succession. The electronic device can then display the corresponding color information for the location, facilitating user recording. This color information can be displayed directly at the clicked location (as shown in Figure 9), or it can be automatically organized into a document after the user clicks. For example, the color information at the clicked location can be automatically copied to the clipboard, where the user can paste it into any text input box on the electronic device. As an example, the pasted information might appear as "First Location - Color Information 1, Second Location - Color Information 2,...". The naming of the locations can be edited by the user for better recording. For example, the first location can be changed to the center of the color-picking object, and the second location to the edge of the color-picking object.

[0214] It should be noted that color appearance information may also include luminance, saturation, hue, contrast, tone, etc., without limitation here.

[0215] In some examples, after the electronic device generates the first color sample image, it can freeze-frame and display the first color sample image on the shooting preview interface, so that the user can quickly view and record color information.

[0216] In other examples, after the electronic device generates the first color picker image, it can automatically store the first color picker image in the electronic device's gallery. The user can open the first color picker image in the gallery and obtain the color appearance information of the color picker object at one or more locations by clicking on the first color picker image in the gallery.

[0217] In this embodiment, an electronic device can be used to sample the color of an object, so that the object appears as it does under a first preset light source, thus restoring the object's color under that light source. Specifically, this color sampling method not only helps in selecting a wide variety of colored goods and materials, but also in displaying more accurate color effects for banquets or stages. It can also help users with artistic needs to accurately sample the colors of landscapes or related materials on-site. Therefore, the color sampling method provided in this application achieves a non-contact color sampling solution, allowing for color sampling without physical contact with the object, using photography to restore the object's color under the first preset light source. This helps users select, display, or design colors.

[0218] For example, in a decoration scenario, it is necessary to select furniture with a uniform color scheme. The color sampling method provided in this application embodiment can sample the colors of multiple pieces of furniture separately so that all pieces of furniture appear as their colors under a first preset light source. At this time, by comparing the first color sampling image corresponding to each piece of furniture, it can be determined that the furniture has the same color.

[0219] For example, in scenarios involving the selection of products with a wide variety of colors, such as lipsticks, the numerous shades of lipsticks can be difficult to distinguish with the naked eye, and the difficulty is further increased under different lighting conditions. The color sampling method provided in this application can sample the color of the lipstick to present its appearance under a first preset light source, and can further obtain the lipstick's color appearance information (e.g., RGB values) under the first preset light source, enabling rapid differentiation of different lipstick shades and thus helping users quickly select the right lipstick.

[0220] For example, in a stage setting, a specific color scheme needs to be presented. The color sampling method provided in this application can take pictures of multiple materials to sample their colors. This not only presents the color appearance of each material under the first preset light source before matching, which is beneficial for material selection, but also presents the color appearance of the stage under the first preset light source after matching, which is beneficial for overall display and facilitates further adjustments to the stage.

[0221] For example, in the scenario of on-site landscape photography, the colors of the scene may appear different due to different weather, seasons, and temperatures. The color sampling method provided in this application embodiment can capture the color appearance of the scene under a first preset light source, eliminating the interference of external ambient light and improving the accuracy and stability of the colors in on-site landscape photography.

[0222] In some embodiments, the first preset light source can be a D65 standard light source. The D65 standard light source, also known as international standard artificial daylight, has a color temperature of 6500K. In this embodiment, because the D65 standard light source has a stable color temperature, a high color rendering index, and spectral characteristics close to natural light, the color extraction method provided in this application presents the color appearance of the extracted object under the first preset light source. This allows for stable and accurate reproduction of the original color appearance of the extracted object, and also provides greater universality, making the color extraction method of this application more easily applicable to various scenarios.

[0223] In other embodiments, the first preset light source can also be other standard light sources, such as D50, D55, D75, F, F(CWF), F7, A, TL84, U30(TL83), UV, etc. Specifically, the type of the first preset light source can be preset according to different application scenarios of the electronic device. For example, commercial displays may prefer to choose TL84 or CWF standard light sources to simulate a store lighting environment. Therefore, using TL84 or CWF standard light sources for color sampling in the first preset light source is beneficial for color selection in commercial displays. Similarly, home lighting may choose F or U30 standard light sources to create a comfortable atmosphere. Therefore, using F or U30 standard light sources for color sampling in the first preset light source is beneficial for color selection in furniture matching or displays.

[0224] Please refer to Figures 11 and 13. In some embodiments, the user can open the first color sampling image in the gallery and edit it using the tabs in the first color sampling image to generate a second color sampling image, thereby obtaining the color appearance of the sampled object under a second preset light source. The second color sampling image can directly overwrite the first color sampling image, or it can be saved as a new image. After obtaining the second color sampling image, the user can further click on the sampled object in the second color sampling image to obtain the color appearance information (e.g., RGB values) of the sampled object at different locations, facilitating review and recording.

[0225] The first preset light source can be a D65 standard light source, so that the electronic device can generate a first color image by default to obtain the color appearance of the color object under the first preset light source. Since the D65 standard light source has a stable color temperature, a high color rendering index, and spectral characteristics close to natural light, the color sampling method provided in this application presents the color appearance of the color object under the first preset light source, which can stably and accurately restore the original color appearance of the color object, and is more universal, making the color sampling method of this application easier to apply to various scenarios.

[0226] Furthermore, designing the second preset light source as other standard light sources facilitates easier application to specific scenarios. For example, the second preset light source can be a D50 standard light source, a D55 standard light source, a D75 standard light source, an F standard light source, an F (CWF) standard light source, an F7 standard light source, an A light source, a TL84 standard light source, a U30 (TL83) standard light source, a UV light source, etc. Specifically, the type of the second preset light source can be preset according to different application scenarios of the electronic device. When the color appearance information under the second preset light source is more convenient than that under the first preset light source in these application scenarios, the first color sampling image can be edited to obtain the second color sampling image. For example, commercial displays may prefer to choose TL84 or CWF standard light sources to simulate the lighting environment of a store. Therefore, using TL84 or CWF standard light sources for color sampling in the second preset light source is beneficial for color selection in commercial displays. On the other hand, home lighting may choose F or U30 standard light sources to create a comfortable atmosphere. Therefore, using F or U30 standard light sources for color sampling in the second preset light source is beneficial for color selection in furniture matching or displays.

[0227] It should be noted that after the electronic device generates the first color image, the color appearance information of the color-picking object under the first preset light source is stored in the exchangeable image file format information of the first color image, which contains the color appearance information of the color-picking object at various locations.

[0228] It should be noted that the EXIF ​​information also includes Color Correction Matrix (CCM) information and Look-Up Table (LUT) information, so that after the first color sample image is shared or shared with other electronic devices, it can be matched and displayed according to the color gamut of the screen of other electronic devices.

[0229] In some embodiments, the electronic device may generate a second color image based on a first color image and a first mapping relationship.

[0230] The first mapping relationship, also known as the first mapping matrix, can be stored in the memory of the electronic device. The electronic device can generate a second color image based on the first color image by calling the first mapping relationship.

[0231] Specifically, the color chart can be photographed under a first preset light source to obtain the second spectrum of each color under the first preset light source, and the color chart can be photographed under a second preset light source to obtain the ninth spectrum of each color under the second preset light source. Thus, the first mapping relationship can be obtained by matching the spectra of the same color under different light sources.

[0232] In this embodiment, after generating the first color-picking image, the electronic device can support users to view and edit the first color-picking image in their gallery. When the user selects to edit and transform the color appearance of the color-picking object under the second preset light source, the electronic device can transform the first color-picking image through the first mapping relationship to obtain the color appearance of the color-picking object under the second preset light source. This helps to broaden the application scenarios of color picking by the electronic device, thereby improving the user experience.

[0233] In other embodiments, the electronic device may also generate a second color image based on a third mapping relationship.

[0234] Specifically, under a flash light source only, the first spectrum of the color chart is recorded; under a second preset light source only, the ninth spectrum of the color chart is recorded. A mapping relationship is formed by linking the first information in the first spectrum corresponding to the same color on the color chart with the ninth information in the ninth spectrum, thus creating the aforementioned third mapping relationship. Therefore, a second color image can be generated based on the first color image through the third mapping relationship, and the color appearance of the second color image is the color appearance under the second preset light source.

[0235] In this embodiment, after generating the first color-picking image, the electronic device can support users to view and edit the first color-picking image in their gallery. When the user selects to edit and transform the color appearance of the color-picking object under the second preset light source, the electronic device can transform the first color-picking image through a third mapping relationship to obtain the color appearance of the color-picking object under the second preset light source. This helps to broaden the application scenarios of color picking by the electronic device, thereby improving the user experience.

[0236] In some examples, the electronic device can be configured before color picking begins, setting the color to the appearance of a second preset light source, so that the electronic device can call a third mapping relationship during the color picking process.

[0237] In other examples, after the first color picker image is generated, it can be edited in the electronic device's gallery to change the color appearance of the color picker object under different light sources, so that the electronic device can call the third mapping relationship to generate a second color picker image.

[0238] Please refer to Figures 14 and 15. Figure 14 is a detailed flowchart of a color picking method provided in an embodiment of this application; Figure 15 is a schematic diagram of the detailed flowchart of the color picking method shown in Figure 14.

[0239] In some embodiments, the color picking method can be applied to electronic devices with shooting functions, specifically including steps S1 and S2.

[0240] S1, in response to the color picking command, the electronic device displays a shooting preview interface. The color picking command is used to instruct the electronic device to display a shooting preview interface in color picking mode.

[0241] The color picker command can include operations on the color picker icon. The color picker icon can be an icon that activates the color picker mode, or it can be the icon of the color picker application.

[0242] In some embodiments, referring to Figure 3, the electronic device may have a first application installed, and the shooting preview interface may be provided by the first application. The first application may be a camera. In this embodiment, clicking the camera in the application's display interface of the electronic device allows access to the shooting preview interface via the camera's preview interface, thus achieving quick access to the shooting preview interface and conforming to the user's habitual use of electronic devices.

[0243] Referring to Figures 4 to 6, the preview interface of the first application may include a color picker icon. The electronic device can allow the user to click the color picker icon to enter the shooting preview interface in color picker mode and display a color picker frame so that the user can select the color picker object by operating the color picker frame.

[0244] In some examples (see Figures 4 and 6), the color picker icon can be directly integrated into the function options at the bottom of the camera's preview interface. Clicking the color picker icon will take you to the shooting preview interface in color picker mode and bring up the color picker box. In other examples (see Figures 4 and 5), you can click "More Options" at the bottom of the camera's preview interface to open a tab. The color picker icon can be integrated into the tab. Clicking the color picker in the tab will take you back to the shooting preview interface and into the shooting preview interface in color picker mode, bringing up the color picker box.

[0245] In other embodiments, referring to Figures 6 and 7, the electronic device may further include a second application, and the shooting preview interface may be a first application called by the second application. The second application may be a color-picking application.

[0246] In this embodiment, the electronic device can integrate the color picking function into a second application. By clicking the icon of the second application, users can directly enter the shooting preview interface in color picking mode and bring up the color picking frame. Furthermore, after the second application is launched, it can call the API interface of the first application, allowing users to access the shooting function of the first application simply by clicking the second application.

[0247] In the shooting preview interface, all objects can be color pickers. There can be one or more color pickers. The electronic device can support the user to select one or more color pickers, thereby further realizing the color picking of the selected color picker.

[0248] S2, in response to the first operation, the electronic device acquires a first color image, the first color image including a color object, the color appearance of the color object being the color appearance under a first preset light source.

[0249] In some examples, referring to Figure 8, the shooting preview interface may include a shooting button, and the first operation mentioned above may include (or may be) the user clicking the shooting button.

[0250] In other examples, the user can also perform the first operation by clicking a button 190 located on the side of the electronic device. This can be achieved by clicking the volume control buttons on button 190, or by having a separate shutter button on button 190. In these cases, the first operation can include (or may be) the user clicking the shutter button on button 190.

[0251] In some examples, the first color picker image may be entirely composed of color pickers, while in other examples, the first color picker image may be partially composed of color pickers; this is not a limitation here.

[0252] It should be noted that the first preset light source is a default light source type pre-set in the electronic device, so that in any color-picking image acquired by the electronic device in any number of shots, the color appearance of the color-picking object is the color appearance under the first preset light source, unaffected by external environmental interference. In other words, any color-picking object has a unique and fixed color appearance under the first preset light source. For example, when a user uses an electronic device that performs the color-picking method provided in the embodiments of this application to shoot any color-picking object in color-picking mode, regardless of the ambient light source under which the color-picking object is located, the electronic device can acquire the color appearance of the color-picking object under the first preset light source, thereby providing the user with a more accurate and standard color perception.

[0253] In some embodiments, the first preset light source can be a D65 standard light source. The D65 standard light source, also known as international standard artificial daylight, has a color temperature of 6500K. In this embodiment, because the D65 standard light source has a stable color temperature, a high color rendering index, and spectral characteristics close to natural light, the color extraction method provided in this application presents the color appearance of the extracted object under the first preset light source. This allows for stable and accurate reproduction of the original color appearance of the extracted object, and also provides greater universality, making the color extraction method of this application more easily applicable to various scenarios.

[0254] In other embodiments, the first preset light source can also be other standard light sources, such as D50, D55, D75, F, F(CWF), F7, A, TL84, U30(TL83), UV, etc. Specifically, the type of the first preset light source can be preset according to different application scenarios of the electronic device. For example, commercial displays may prefer to choose TL84 or CWF standard light sources to simulate a store lighting environment. Therefore, using TL84 or CWF standard light sources for color sampling in the first preset light source is beneficial for color selection in commercial displays. Similarly, home lighting may choose F or U30 standard light sources to create a comfortable atmosphere. Therefore, using F or U30 standard light sources for color sampling in the first preset light source is beneficial for color selection in furniture matching or displays.

[0255] In some embodiments, referring to Figure 6, the shooting preview interface may include a color picker box. The color picker box allows selection of the color object, thereby improving the accuracy of the color object selection and reducing the computational load of color picking.

[0256] In some examples, before the electronic device acquires the first color picker image, the color picking method may also include: S121, in response to a second operation by the user on the color picker box, the electronic device determines the color picker object.

[0257] In this embodiment, the electronic device allows users to change the position of the color picker by dragging, and also allows users to change the size of the color picker by splitting or pinching two fingers. It is easy to understand that changing the position and size of the color picker allows the user to change the color object they want to select. The second operation described above can be an operation to change the position of the color picker, and / or an operation to change the size of the color picker.

[0258] In this embodiment, the second operation enables the selection of a color-picking object, distinguishing it from the surrounding scene and facilitating subsequent color picking. For example, referring to Figure 8, after the electronic device selects a color-picking object, the area around the object is darker than the object itself, making it easier for the user to clearly see the object.

[0259] In other examples, before the electronic device acquires the first color image, the color picking method may also include: S122, the electronic device determines the color picking object through a recognition algorithm.

[0260] In this embodiment, the electronic device can also automatically determine the color sampling object through a recognition algorithm, without requiring user intervention, thereby making the selection of the color sampling object faster and more efficient, and thus improving color sampling efficiency. The recognition algorithm may include algorithms such as object detection and salient subject detection.

[0261] The recognition algorithm can be determined by the user's selection operation when the electronic device is selecting colors. For example, when the user sets the artificial intelligence function to be enabled (such as the master AI function) when selecting colors, the recognition algorithm will run automatically in the background of the electronic device to automatically select the color object.

[0262] In some other examples, before the electronic device acquires the first color-picking image, the color-picking method may also include: S1231, the electronic device identifies the color-picking object through a recognition algorithm; S1232, in response to a second operation by the user on the color-picking frame, the electronic device determines the color-picking object.

[0263] In this embodiment, after the recognition algorithm automatically identifies the color picking object, the electronic device can allow the user to make further adjustments based on the color picking object selected by the recognition algorithm, such as adjusting the position and size of the color picking box, so as to adjust the selection of the color picking object. The electronic device can determine the color picking object after the user adjusts the color picking box.

[0264] In addition, the color acquisition process also includes: the electronic device displays prompts to the user on the shooting preview interface through a recognition algorithm.

[0265] In this embodiment, the recognition algorithm also detects in real time whether the electronic device is held steady and whether the shooting distance deviates from the shooting range. If it is found that the electronic device is not held steady or the shooting distance exceeds the preset shooting range, relevant user prompts will be displayed on the shooting preview interface (such as "Please hold the phone steady", "Shooting distance too close / too far", etc.) to prompt the user to hold the phone steady or change the shooting distance.

[0266] In some embodiments, referring to FIG10, in response to the first operation, the electronic device acquires a first color image, which may specifically include: S21, in response to the first operation, the electronic device captures a first original image; S22, based on the first original image, the electronic device generates a first color image.

[0267] In this embodiment, the electronic device can obtain the first color-picking image by taking a picture of the color-picking object, so that the color-picking function can be coupled to the shooting function of the electronic device, thereby improving the convenience of color picking.

[0268] Among them, there are multiple first original images, at least one of which was captured by a first camera, and at least another of which was captured by a second camera.

[0269] In this embodiment, since the first camera is a 3-channel camera and the second camera is a multispectral camera, the first original image captured by the first camera can provide a three-color channel image, and the first original image captured by the second camera can provide spectral information. The spectral information can be used to restore the color appearance of the color-picking object under the first preset light source based on the three-color channel image, so that the electronic device can calculate and generate the first color-picking image through the first original image captured by the first camera and the first original image captured by the second camera.

[0270] In some embodiments, the multiple first original images may include a first image, a second image, a third image, and a fourth image, wherein the first image and the third image are captured by a first camera, and the second image and the fourth image are captured by a second camera. Specifically, method step S21 may include steps S211 and S212.

[0271] S211, the electronic device captures m first images and n second images, m≥1, n≥1, wherein the first images are captured by the electronic device through the first camera with the flash off, and the second images are captured by the electronic device through the second camera with the flash off.

[0272] When the electronic device enters color picking mode, the first and second cameras can simultaneously start working. At this time, the auto-exposure (AE) and auto-focus (AF) algorithms on the preview path will converge the brightness and focus until the shooting preview interface is stable, so that the color-picked object in the shooting preview interface is displayed clearly and stably. Then, after the user performs the first operation, in response to the first operation, the electronic device will control the flash to remain in the off state, and the first and second cameras will capture the first image and the second image respectively.

[0273] During the shooting process of the first and second cameras, the first and second cameras are synchronized in time so that the generation of the first and second images is synchronized in time. At this time, the AE algorithm controls the brightness alignment of the time-aligned first and second images to ensure that the brightness of the images captured by the first and second cameras is consistent.

[0274] It should be noted that since multispectral cameras generally receive less light than three-channel cameras, the exposure time of the second camera will be longer, so m is generally greater than n. Here, both m and n can also be 1.

[0275] S212, the electronic device captures s third images and t fourth images, where s≥1 and t≥1, wherein the third images are captured by the electronic device through the first camera with the flash on, and the fourth images are captured by the electronic device through the second camera with the flash on.

[0276] After the first and second images are captured, the electronic device will control the flash to turn on. At this time, the first and second cameras will capture the third and fourth images respectively.

[0277] It should be noted that t can be greater than s, or both t and s can be 1.

[0278] In some embodiments, referring to FIG10, method step S212 may include: S2121, the electronic device obtains a second exposure parameter based on the first brightness relationship and the first exposure parameter of the first image, and captures a third image based on the second exposure parameter; the electronic device obtains a fourth exposure parameter based on the second brightness relationship and the third exposure parameter of the second image, and captures a fourth image based on the fourth exposure parameter.

[0279] The first brightness relationship refers to the brightness relationship of the first camera with the flash on and off at the first brightness level, and the second brightness relationship refers to the brightness relationship of the second camera with the flash on and off at the first brightness level.

[0280] In this embodiment, the exposure parameters (e.g., aperture number, exposure time, ISO, exposure bias value) are adjusted by the first brightness relationship so that the output brightness of the first camera after the flash is turned on is consistent with the output brightness when the flash is turned off. This helps to ensure the consistency of the output brightness and avoids the increase in output brightness caused by turning on the flash.

[0281] The first brightness relationship can be stored in the memory of the electronic device so that the AE algorithm can call the first brightness relationship to adjust the exposure parameters after the flash is turned on during the color picking process.

[0282] Specifically, at a first brightness level, the algorithm records the first exposure parameters of the image captured by the first camera when the flash is off, and the second exposure parameters of the image captured by the first camera at the same brightness when the flash is on. These first and second exposure parameters are then linked to form a mapping relationship. Similarly, by adjusting the first brightness and recording multiple times, a mapping table is created, thus establishing the first brightness relationship. Therefore, when the first camera captures an image after the flash is on, the AE algorithm can calculate the mapped second exposure parameters based on the first exposure parameters of the first image within the first brightness relationship. This allows the electronic device to capture a third image based on the second exposure parameters, ensuring that the brightness of the third image matches that of the first image.

[0283] In this design, the first camera focuses at the same position when capturing the first and third images to ensure that the focus of the first camera remains fixed during the color sampling process, which is beneficial to the accuracy of color sampling.

[0284] In some embodiments, referring to Figure 10, the electronic device can obtain a fourth image based on a second brightness relationship and a second image. The second brightness relationship is the brightness relationship of the second camera with the flash on and off under the first brightness.

[0285] In this embodiment, the exposure parameters (e.g., aperture number, exposure time, ISO, exposure offset value) are adjusted by the second brightness relationship so that the output brightness of the second camera after the flash is turned on is consistent with the output brightness when the flash is turned off. This helps to ensure the consistency of the output brightness and avoids the increase in output brightness caused by turning on the flash.

[0286] The second brightness relationship can be stored in the memory of the electronic device so that the AE algorithm can call the second brightness relationship to adjust the exposure parameters after the flash is turned on during the color picking process.

[0287] Specifically, at the first brightness level, the third exposure parameter of the image captured by the second camera when the flash is off, and the fourth exposure parameter of the image captured by the second camera at the same brightness when the flash is on, are recorded. These third and fourth exposure parameters are then linked to form a mapping relationship. Similarly, by adjusting the first brightness and recording multiple times, a mapping table is formed, thus creating the second brightness relationship. Therefore, when the second camera captures a picture after the flash is on, the AE algorithm can calculate the mapped fourth exposure parameter based on the third exposure parameter of the second image within the second brightness relationship. This allows the electronic device to capture a fourth image based on the fourth exposure parameter, ensuring that the brightness of the fourth image matches that of the second image.

[0288] In this design, the second camera focuses at the same position when capturing the second and fourth images to ensure that the focus of the second camera remains fixed during the color sampling process, which is beneficial to the accuracy of color sampling.

[0289] It should be noted that in this embodiment, the flash is shown to be turned off and then on during the color picking process. It can be understood that in some other embodiments, the flash may be turned on and then off during the color picking process.

[0290] The first image, second image, third image and fourth image are obtained through the above steps. The first image, second image, third image and fourth image are used as inputs to method step S22 to calculate the first color image.

[0291] In some embodiments, referring to FIG11, method step S22 may include steps S221 and S222.

[0292] S221, the electronic device obtains a fifth image based on the first image and the third image, and the electronic device obtains image preprocessing parameters based on the second image and the fourth image.

[0293] For example, when the number of the first image and the third image is 1, the first image and the third image are denoised respectively. Then, the first image and the third image are luminance aligned, globally registered and luminance normalized in sequence. The difference between the third image and the first image is calculated. Then, the image obtained by the difference is corrected for lens shadow and the white balance (Auto White Balance, AWB) algorithm on the preview stream ISP is removed. That is, the inverse white balance (inverse AWB) is performed in sequence to obtain the fifth image, so that the fifth image is a three-color channel image without color reproduction.

[0294] In this embodiment, by subtracting the third image from the first image, the interference of ambient light can be eliminated, so that the fifth image is a three-color channel map of the color sampled object captured by the first camera under the flash.

[0295] For example, when both the second and fourth images have a quantity of 1, noise reduction is performed on the second and fourth images respectively. Then, brightness alignment, global registration, and brightness normalization are performed on the second and fourth images sequentially. The difference between the fourth and second images is then calculated, and lens shading correction is applied to the resulting image to obtain the sixth image. The image preprocessing parameters can be obtained from the sixth image. These preprocessing parameters may include AWB parameters and / or Color Correction (CC) parameters.

[0296] S222, the electronic device obtains a first color image based on the fifth image and image preprocessing parameters.

[0297] In this embodiment, by taking a set of images before and after the flash is turned on using the first camera and the second camera respectively, a first color image can be obtained, thereby obtaining the true color appearance of the color object under the first preset light source. No special design is required for the first camera, the second camera and the flash, which reduces the difficulty of color picking using electronic devices with shooting functions and improves the efficiency of color picking.

[0298] For example, the electronic device can obtain the third and fourth parameters based on the first parameter, the second parameter, and the second mapping relationship, so that the electronic device can apply the third and fourth parameters to the fifth image to obtain the first color sampling image.

[0299] The second mapping relationship, also known as the second mapping matrix, can be stored in the memory of the electronic device. The electronic device can calculate the third and fourth parameters based on the first and second parameters by calling the second mapping relationship. The first parameter can be the CC parameter in the image preprocessing parameters of the sixth image, and the second parameter can be the AWB parameter in the image preprocessing parameters of the sixth image.

[0300] In this embodiment, under a light source with only a flash, the first spectrum of the color chart is recorded. Under a first preset light source, the second spectrum of the color chart is recorded. A mapping relationship is formed by linking the first information in the first spectrum and the second information in the second spectrum corresponding to the same color in the color chart, thus forming the aforementioned second mapping relationship. The first information includes AWB parameters and CC parameters, and the second information also includes AWB parameters and CC parameters. Therefore, in this embodiment, based on the image preprocessing parameters of the sixth image, the third and fourth parameters corresponding to the first preset light source can be obtained by calling the second mapping relationship. The third parameter is the AWB parameter of the color sampling object captured under the first preset light source, and the fourth parameter is the CC parameter of the color sampling object captured under the first preset light source. Thus, applying the third and fourth parameters to the fifth image can obtain the first color sampling image, and the color appearance of the first color sampling image is the color appearance under the first preset light source.

[0301] In the process of calculating the second mapping relationship, the second camera and the flash can also be calibrated to reduce the differences between the second camera and the standard multispectral camera, as well as the differences between the flash and the standard flash.

[0302] In some embodiments, referring to Figures 11 to 13, after the electronic device acquires the first color-picking image, the electronic device can support the user to edit the first color-picking image. Specifically, after the electronic device acquires the first color-picking image, the color-picking method may further include: S3, displaying the first color-picking image; S4, in response to a third operation by the user on a first position of the color-picking object, the electronic device displays color appearance information of the first position, the color appearance information including the RGB value of the color-picking object at the first position.

[0303] The electronic device allows users to select any location on the color-picking object. The first location can be the center, edge, or corner of the object. The third operation mentioned above can be the user clicking on any location on the color-picking object.

[0304] In this embodiment, referring to Figure 12, the color information of the first position can be displayed by an electronic device, which makes it convenient for the user to record the color information of the color sample object at the first position. This facilitates the user's recording and reference, and is beneficial for the user's subsequent color selection and design.

[0305] In some examples, after the electronic device generates the first color sample image, it can freeze-frame and display the first color sample image on the shooting preview interface, so that the user can quickly perform a third operation to obtain the color appearance information of the color sampled object at the first position.

[0306] In other examples, after the electronic device generates the first color picker image, it can automatically store the first color picker image in the electronic device's gallery. The user can open the first color picker image in the gallery and obtain the color appearance information of the color picker object at the first position through a third operation.

[0307] In some embodiments, after the electronic device generates and displays the first color sampling image, the color sampling method may further include: S401, in response to the fourth operation, the electronic device acquires a second color sampling image, wherein the color appearance of the color sampling object in the second color sampling image is the color appearance under a second preset light source.

[0308] The fourth operation mentioned above may include editing the first color image so that the electronic device can acquire the second color image.

[0309] In some examples, method step S401 may include: S4011, generating a second color image based on the first color image and the first mapping relationship, wherein the first mapping relationship is the mapping relationship between the spectrum captured under the first preset light source and the spectrum captured under the second preset light source.

[0310] Specifically, the color chart can be photographed under a first preset light source to obtain the second spectrum of each color under the first preset light source, and the color chart can be photographed under a second preset light source to obtain the ninth spectrum of each color under the second preset light source. Thus, the first mapping relationship mentioned above can be obtained by matching the spectra of the same color under different light sources one by one.

[0311] In this embodiment, referring to Figure 13, after generating the first color-picking image, the electronic device can support users to view and edit the first color-picking image in their gallery. When the user selects to edit and convert the color appearance of the color-picking object under the second preset light source, the electronic device can convert the first color-picking image through the first mapping relationship to obtain the color appearance of the color-picking object under the second preset light source. This helps to broaden the application scenarios of color picking by the electronic device, thereby improving the user experience.

[0312] In other examples, method step S401 may include: S4012, generating a second color image based on the first color image and the third mapping relationship, wherein the third mapping relationship is the mapping relationship between the spectrum captured under a flash light source and the spectrum captured under a second preset light source.

[0313] Specifically, under a flash light source only, the first spectrum of the color chart is recorded; under a second preset light source only, the ninth spectrum of the color chart is recorded. A mapping relationship is formed by linking the first information in the first spectrum corresponding to the same color on the color chart with the ninth information in the ninth spectrum, thus creating the aforementioned third mapping relationship. Therefore, a second color image can be generated based on the first color image through the third mapping relationship, and the color appearance of the second color image is the color appearance under the second preset light source.

[0314] In this embodiment, referring to Figure 13, after generating the first color-picking image, the electronic device can support users to view and edit the first color-picking image in their gallery. When the user selects to edit and transform the color appearance of the color-picking object under the second preset light source, the electronic device can transform the first color-picking image through the third mapping relationship to obtain the color appearance of the color-picking object under the second preset light source. This helps to broaden the application scenarios of color picking by the electronic device, thereby improving the user experience.

[0315] For example, referring to Figure 13, a user can open a first color sampling image in the gallery and edit it using the tabs in the first color sampling image to generate a second color sampling image, thereby obtaining the color appearance of the sampled object under a second preset light source. The second color sampling image can directly overwrite the first color sampling image, or it can be saved as a new image. Referring to Figure 12, after obtaining the second color sampling image, the user can further click on the sampled object within the second color sampling image to obtain the color appearance information (e.g., RGB values) of the sampled object at different locations, facilitating review and recording.

[0316] In some embodiments, the first preset light source can be a D65 standard light source, so that the electronic device can generate a first color image by default to obtain the color appearance of the color object under the first preset light source. Since the D65 standard light source has a stable color temperature, a high color rendering index, and spectral characteristics close to natural light, the color sampling method provided in this application presents the color appearance of the color object under the first preset light source, which can stably and accurately restore the original color appearance of the color object, and is more universal, making the color sampling method of this application easier to apply to various scenarios.

[0317] Furthermore, by designing the second preset light source to be another standard light source, it is easier to apply it to specific scenarios. For example, the second preset light source can be a D50 standard light source, a D55 standard light source, a D75 standard light source, an F standard light source, an F (CWF) standard light source, an F7 standard light source, an A light source, a TL84 standard light source, a U30 (TL83) standard light source, a UV light source, etc.

[0318] In some embodiments, after the electronic device acquires the first color image, the color acquisition method may further include: S301, the electronic device stores the color appearance information of the color acquisition object under the first preset light source into the exchangeable image file information of the first color image.

[0319] In this embodiment, the color appearance information of the color-picking object under the first preset light source is stored in the exchangeable image file (exif) information of the first color-picking image to facilitate the viewing and editing of the first color-picking object, which includes the color appearance information of the color-picking object at various locations.

[0320] In some embodiments, after the electronic device acquires the first color sample image, the color sampling method may further include: S302, the electronic device stores color correction matrix information and lookup table information for matching color gamut display into the exchangeable image file information of the first color sample image.

[0321] In this embodiment, the EXIF ​​information also includes Color Correction Matrix (CCM) information and Look-Up Table (LUT) information, so that after the first color image is shared or shared to other electronic devices, it can be matched and displayed according to the color gamut of the screen of other electronic devices.

[0322] It should be noted that one or more of the modules or units described in this application can be implemented by software, hardware, or a combination of both. When any of the above modules or units are implemented by software, the software exists as computer program instructions and is stored in memory. The processor can be used to execute the program instructions and implement the above method flow. The processor can include, but is not limited to, at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller unit (MCU), or an artificial intelligence processor, etc., and various computing devices that run software. Each computing device may include one or more cores for executing software instructions to perform calculations or processing. The processor can be built into a SoC (System-on-a-Chip) or an application-specific integrated circuit (ASIC), or it can be a separate semiconductor chip. In addition to the cores within the processor for executing software instructions to perform calculations or processing, it may further include necessary hardware accelerators, such as field-programmable gate arrays (FPGAs), PLDs (programmable logic devices), or logic circuits that implement dedicated logic operations.

[0323] When the modules or units described in this application are implemented in hardware, the hardware may be any one or any combination of a CPU, microprocessor, DSP, MCU, artificial intelligence processor, ASIC, SoC, FPGA, PLD, application-specific digital circuit, hardware accelerator or non-integrated discrete device, which may run the necessary software or perform the above method flow independently of the software.

[0324] When the modules or units described in this application are implemented using software, they can be implemented in whole or in part as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0325] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0326] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0327] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0328] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0329] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0330] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0331] It should be noted that all the above figures are exemplary illustrations of this application and do not represent the actual size of the product. Furthermore, the dimensional proportions between the components in the figures are not intended to limit the actual product of this application.

[0332] The above are merely some embodiments and implementation methods of this application. The scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A color sampling method, applied to electronic devices, characterized in that, The method includes: In response to a color picking command, the electronic device displays a shooting preview interface, wherein the color picking command is used to instruct the electronic device to display a shooting preview interface in color picking mode; In response to the first operation, the electronic device acquires a first color sampling image, the first color sampling image including a color sampling object, the color appearance of the color sampling object being the color appearance under a first preset light source.

2. The method as described in claim 1, characterized in that, The electronic device acquires the first color image, specifically including: The electronic device captures a first raw image; Based on the first original image, the electronic device generates the first color-picked image.

3. The method as described in claim 2, characterized in that, The electronic device includes a first camera and a second camera, wherein the first camera is a 3-channel camera and the second camera is an X-channel camera, wherein X is greater than 3; There are multiple first original images, at least one of which was captured by the first camera, and at least another of which was captured by the second camera.

4. The method according to any one of claims 1 to 3, characterized in that, The first preset light source is a D65 standard light source.

5. The method according to any one of claims 1 to 4, characterized in that, The shooting preview interface includes a color picker box. Before the electronic device acquires the first color picker image in response to the first operation, the method further includes: In response to a second operation by the user on the color picker, the electronic device determines the color picker object; Alternatively, the electronic device may determine the color-picking object through a recognition algorithm.

6. The method according to any one of claims 1 to 4, characterized in that, The shooting preview interface includes a color picker box. Before the electronic device acquires the first color picker image in response to the first operation, the method further includes: The electronic device identifies the color-picking object through a recognition algorithm; In response to a second operation by the user on the color picker, the electronic device determines the color picker object.

7. The method as described in claim 5 or 6, characterized in that, The shooting preview interface includes a color picker box. Before the electronic device acquires the first color picker image in response to the first operation, the method further includes: The electronic device displays user information on the shooting preview interface using a recognition algorithm.

8. The method according to any one of claims 1 to 7, characterized in that, After the electronic device acquires the first color sample image, the method further includes: Display the first color picker image; In response to a third operation by the user on a first location of the color-picking object, the electronic device displays color appearance information for the first location, the color appearance information including the RGB value of the color-picking object at the first location.

9. The method according to any one of claims 1 to 8, characterized in that, After the electronic device acquires the first color sample image, the method further includes: The electronic device stores the color appearance information of the color-picking object under the first preset light source into the exchangeable image file information of the first color-picking image.

10. The method as described in claim 9, characterized in that, After the electronic device acquires the first color sample image, the method further includes: The electronic device stores color correction matrix information and lookup table information for matching color gamut display into the exchangeable image file information of the first color sample image.

11. The method of any one of claims 1 to 10, wherein after the electronic device acquires the first color image, the method further comprises: In response to the fourth operation, the electronic device acquires a second color image, wherein the color appearance of the color-picking object in the second color image is the color appearance under a second preset light source.

12. The method as described in claim 11, characterized in that, The electronic device acquires the second color image, specifically including: The second color image is generated based on the first color image and the first mapping relationship, wherein the first mapping relationship is the mapping relationship between the spectrum captured under the first preset light source and the spectrum captured under the second preset light source.

13. The method according to any one of claims 1 to 12, characterized in that, The color picking instruction includes: operations on a color picking icon, wherein the color picking icon is an icon for activating color picking mode, or the color picking icon is an icon for a color picking application.

14. The method according to any one of claims 1 to 13, characterized in that, The electronic device is equipped with a first application, and the shooting preview interface is provided by the first application.

15. The method as described in claim 14, characterized in that, The electronic device also has a second application installed, and the shooting preview interface is displayed by the second application calling the first application.

16. The method according to any one of claims 1 to 15, characterized in that, The electronic device includes a first camera, a second camera, and a flash. The first camera is a 3-channel camera, and the second camera is an X-channel camera, wherein X is greater than 3. The electronic device acquiring the first color image further includes: The electronic device captures m first images and n second images, where m≥1 and n≥1. The first images are captured by the electronic device through the first camera when the flash is off, and the second images are captured by the electronic device through the second camera when the flash is off. The electronic device captures s third images and t fourth images, where s ≥ 1 and t ≥ 1. The third images are captured by the electronic device through the first camera when the flash is on, and the fourth images are captured by the electronic device through the second camera when the flash is on. The electronic device obtains a fifth image based on the first image and the third image, and the electronic device acquires image preprocessing parameters based on the second image and the fourth image; The electronic device obtains the first color-picking image based on the fifth image and the image preprocessing parameters.

17. The method as described in claim 16, characterized in that, The image preprocessing parameters include color correction parameters and / or white balance parameters.

18. The method as described in claim 16 or 17, characterized in that, The electronic device captures s third images and t fourth images, specifically including: The electronic device obtains a second exposure parameter based on a first brightness relationship and a first exposure parameter of the first image, and captures the third image based on the second exposure parameter. The electronic device obtains a fourth exposure parameter based on the second brightness relationship and a third exposure parameter of the second image, and captures the fourth image based on the fourth exposure parameter. The first brightness relationship is the brightness relationship of the first camera with the flash on and off at a first brightness level. The second brightness relationship is the brightness relationship of the second camera with the flash on and off at the first brightness level.

19. The method according to any one of claims 16 to 18, characterized in that, When the first camera captures the first image and the third image, the focus position of the first camera is the same; When the second camera captures the second image and the fourth image, the focus position of the second camera is the same.

20. An electronic device, characterized in that, include: One or more processors; One or more memory units; And one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, the one or more computer programs including instructions that, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1 to 19.

21. A computer-readable storage medium, characterized in that, The storage medium stores a program or instructions that, when executed, implement the method as described in any one of claims 1 to 19.

22. A computer program product, characterized in that, The computer program product stores a program or instructions that, when executed, implement the method as described in any one of claims 1 to 19.

Citation Information

Patent Citations

  • Touch pen and color picking method

    CN113838154A

  • Color picking method and device, electronic equipment, storage medium and computer program product

    CN117788758A

  • Method, apparatus and computer program product for detection and correction of image defect

    WO2015055892A1

  • Color information acquisition device, color information acquisition system, color information acquisition server device, and color information acquisition method

    WO2015156091A1

  • Image noise reduction method and device thereof

    WO2016086489A1