[go: up one dir, main page]

WO2020244619A1 - Spectral curve acquiring method, electronic device, and chip - Google Patents

Spectral curve acquiring method, electronic device, and chip Download PDF

Info

Publication number
WO2020244619A1
WO2020244619A1 PCT/CN2020/094570 CN2020094570W WO2020244619A1 WO 2020244619 A1 WO2020244619 A1 WO 2020244619A1 CN 2020094570 W CN2020094570 W CN 2020094570W WO 2020244619 A1 WO2020244619 A1 WO 2020244619A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
light
electronic device
target object
images
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2020/094570
Other languages
French (fr)
Chinese (zh)
Inventor
朱力于
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of WO2020244619A1 publication Critical patent/WO2020244619A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B15/00Special procedures for taking photographs; Apparatus therefor
    • G03B15/02Illuminating scene
    • G03B15/03Combinations of cameras with lighting apparatus; Flash units
    • G03B15/05Combinations of cameras with electronic flash apparatus; Electronic flash units
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means

Definitions

  • the embodiments of the present application relate to the field of spectral analysis technology, and in particular to a method for obtaining a spectral curve, electronic equipment, and a chip.
  • the optical device In the traditional process of acquiring the spectrum curve, the optical device is used as the light source to illuminate the object.
  • the wavelength of the light passing through the lens of the optical device is different at different times, so that different wavelengths of light are used for irradiation
  • the optical equipment images the object in different time periods, and images of the same object in different bands can be obtained.
  • the optical device sends the images of these different wavebands to the electronic device, and the electronic device analyzes the images of the different wavebands to obtain the spectral curve of the object.
  • the embodiments of the present application provide a method for obtaining a spectrum curve, an electronic device, and a chip, and a light supplement device provides light of different wavelength bands to achieve the purpose of obtaining a spectrum curve of an object.
  • an embodiment of the present application provides a method for obtaining a spectral curve, which can be applied to an electronic device or a chip in an electronic device.
  • the method is described below by taking an electronic device as an example.
  • the method includes: the electronic device receives a shooting request input by a user, and the shooting request is used to request to shoot a group of images, and the group of images includes a first image and a first image.
  • the light source of the first image is a light supplement device and ambient light
  • the light source of the second image is ambient light
  • the light supplement device includes at least one light supplement lamp, and different light supplement lamps in the at least one light supplement light
  • the electronic equipment controls the exposure sequence of each fill light in the fill light device according to the shooting request; according to the exposure sequence, the target object is photographed to obtain the first image and the second image; One image and the second image determine the spectral curve of the target object.
  • the electronic device receives a shooting request input by the user requesting to shoot a group of images or, according to the shooting request, controls the exposure sequence of each fill light in the fill light device, and obtains a set of images according to the exposure sequence.
  • the group of images includes images that are illuminated by different fill lights and ambient light at the same time, and images that are illuminated by only ambient light. Then, the electronic device obtains the spectral curve of the target object according to the images. In this process, different wavelengths of light are provided by the fill light to obtain images of different wavelength bands of the target object, and then the spectral curve of the target object is obtained, without the need for a dedicated spectrometer, and the cost is low. Moreover, it can be provided to ordinary users to use in their daily lives. In addition, the process of acquiring the spectral curve does not change the normal photographing architecture of the electronic device.
  • the electronic device determines the spectral curve of the target object based on the first image and the second image, it removes the second image from the first image to obtain a third image whose light source is a light supplement device; The third image determines the spectral curve of the target object.
  • the electronic device obtains a third image by removing the second image from each first image, and uses each third image to determine the spectral curve of the target object, so as to achieve the purpose of obtaining the spectral curve of the target object.
  • the electronic device determines the spectral curve of the target object according to the third image, it performs interpolation processing on the third image corresponding to each of the at least one fill light to obtain the spectral curve of the target object.
  • the spectral curve of the target object is obtained through an interpolation algorithm, so as to achieve the purpose of obtaining the spectral curve of the target object.
  • the difference between the wavelengths of two adjacent fill lamps in the exposure sequence is a preset difference.
  • the wavelength difference between two adjacent fill light lamps in the exposure sequence is a preset threshold, the wavelengths provided by the fill light device are distributed in the entire frequency spectrum.
  • the supplementary light frequency band of the supplementary light device is visible light frequency band
  • the first image and the second image are red, green and blue RGB images
  • the supplementary light frequency band of the supplementary light device is infrared frequency band
  • the first image and the second The image is a red, green, blue infrared RGB-IR image.
  • the supplementary light frequency band of the supplementary light device can be a visible light frequency band or an infrared frequency band, achieving the purpose of flexibly acquiring spectral images according to requirements.
  • the light supplement device is built into the electronic device; or the light supplement device is externally placed on the electronic device.
  • an embodiment of the present application provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and running on the processor.
  • the processor executes the following steps when the program is executed: receiving a user
  • the input shooting request the shooting request is used to request to shoot a group of images, the group of images includes the first image and the second image, the light source of the first image is the light supplement device and the ambient light, and the light source of the second image is
  • the light-filling device includes at least one light-filling lamp, and different light-filling lamps in the at least one light-filling lamp are used to provide light of different wavelengths; according to the shooting request, controlling the exposure sequence of the light-filling lamps in the light-filling device; According to the exposure sequence, the target object is photographed to obtain the first image and the second image; according to the first image and the second image, the spectral curve of the target object is determined.
  • the electronic device receives a shooting request input by the user requesting to shoot a group of images or, according to the shooting request, controls the exposure sequence of each fill light in the fill light device, and obtains a set of images according to the exposure sequence.
  • the group of images includes images that are illuminated by different fill lights and ambient light at the same time, and images that are illuminated by only ambient light.
  • the electronic device obtains the spectral curve of the target object according to the images.
  • different wavelengths of light are provided by the fill light to obtain images of different wavelength bands of the target object, and then the spectral curve of the target object is obtained, without the need for a dedicated spectrometer, and the cost is low.
  • it can be provided to ordinary users to use in their daily lives.
  • the process of acquiring the spectral curve does not change the normal photographing architecture of the electronic device.
  • the electronic device determines the spectral curve of the target object based on the first image and the second image, it removes the second image from the first image to obtain a third image whose light source is a light supplement device; The third image determines the spectral curve of the target object.
  • the electronic device obtains a third image by removing the second image from each first image, and uses each third image to determine the spectral curve of the target object, so as to achieve the purpose of obtaining the spectral curve of the target object.
  • the electronic device determines the spectral curve of the target object according to the third image, it performs interpolation processing on the third image corresponding to each of the at least one fill light to obtain the spectral curve of the target object.
  • the spectral curve of the target object is obtained through the interpolation algorithm, and the purpose of obtaining the spectral curve of the target object is achieved.
  • the difference between the wavelengths of two adjacent fill lamps in the exposure sequence is a preset difference.
  • the wavelength difference between two adjacent fill light lamps in the exposure sequence is a preset threshold, the wavelengths provided by the fill light device are distributed in the entire frequency spectrum.
  • the supplementary light frequency band of the supplementary light device is visible light frequency band
  • the first image and the second image are red, green and blue RGB images
  • the supplementary light frequency band of the supplementary light device is infrared frequency band
  • the first image and the second The image is a red, green, blue infrared RGB-IR image.
  • the supplementary light frequency band of the supplementary light device can be a visible light frequency band or an infrared frequency band, achieving the purpose of flexibly acquiring spectral images according to requirements.
  • the light supplement device is built into the electronic device; or the light supplement device is externally placed on the electronic device.
  • an embodiment of the present application provides a chip that includes a processor and an interface.
  • the interface is used to receive code instructions and transmit them to the processor.
  • the processor runs the code instructions to perform the following steps: Request, the shooting request is used to request to shoot a group of images, the group of images contains a first image and a second image, where the light source of the first image is the light supplement device and the ambient light, and the light source of the second image is the environment
  • the fill light device includes at least one fill light, and different fill lights in the at least one fill light are used to provide light of different wavelengths; according to the shooting request, control the exposure sequence of each fill light in the fill light device; according to the exposure Sequentially, the target object is photographed to obtain the first image and the second image; according to the first image and the second image, the spectral curve of the target object is determined.
  • the electronic device receives a user input request to take a group of images According to the shooting request or, according to the shooting request, control the exposure sequence of each fill light in the fill light device, and obtain a set of images according to the exposure sequence.
  • the set of images includes images that are simultaneously illuminated by different fill lights and ambient light And an image illuminated only by ambient light.
  • the electronic device obtains the spectral curve of the target object according to the images.
  • different wavelengths of light are provided by the fill light to obtain images of different wavelength bands of the target object, and then the spectral curve of the target object is obtained, without the need for a dedicated spectrometer, and the cost is low.
  • it can be provided to ordinary users to use in their daily lives.
  • the process of acquiring the spectral curve does not change the normal photographing architecture of the electronic device.
  • the electronic device determines the spectral curve of the target object based on the first image and the second image, it removes the second image from the first image to obtain a third image whose light source is a light supplement device; The third image determines the spectral curve of the target object.
  • the electronic device obtains a third image by removing the second image from each first image, and uses each third image to determine the spectral curve of the target object, so as to achieve the purpose of obtaining the spectral curve of the target object.
  • the electronic device determines the spectral curve of the target object according to the third image, it performs interpolation processing on the third image corresponding to each of the at least one fill light to obtain the spectral curve of the target object.
  • the spectral curve of the target object is obtained through an interpolation algorithm, so as to achieve the purpose of obtaining the spectral curve of the target object.
  • the difference between the wavelengths of two adjacent fill lamps in the exposure sequence is a preset difference.
  • the wavelength difference between two adjacent fill light lamps in the exposure sequence is a preset threshold, the wavelengths provided by the fill light device are distributed in the entire frequency spectrum.
  • the supplementary light frequency band of the supplementary light device is visible light frequency band
  • the first image and the second image are red, green and blue RGB images
  • the supplementary light frequency band of the supplementary light device is infrared frequency band
  • the first image and the second The image is a red, green, blue infrared RGB-IR image.
  • the supplementary light frequency band of the supplementary light device can be a visible light frequency band or an infrared frequency band, achieving the purpose of flexibly acquiring spectral images according to requirements.
  • the light supplement device is built into the electronic device; or the light supplement device is externally placed on the electronic device.
  • an embodiment of the present application provides a computer program product containing instructions, which when run on an electronic device, causes the electronic device to execute the foregoing first aspect or the methods in the various possible implementation manners of the first aspect.
  • an embodiment of the present application provides a computer-readable storage medium that stores instructions in the computer-readable storage medium, and when it runs on an electronic device, the electronic device executes the first aspect or the first aspect described above.
  • the electronic device receives a user input request to shoot a group of images or, according to the shooting request, controls the exposure of each fill light in the fill light device Sequence: According to the exposure sequence, a set of images is obtained.
  • the set of images includes images that are illuminated by different fill lights and ambient light at the same time and images that are illuminated by only ambient light. Then, the electronic device obtains the spectral curve of the target object according to the images.
  • different wavelengths of light are provided by the fill light to obtain images of different wavelength bands of the target object, and then the spectral curve of the target object is obtained, without the need for a dedicated spectrometer, and the cost is low.
  • it can be provided to ordinary users to use in their daily lives.
  • the process of acquiring the spectral curve does not change the normal photographing architecture of the electronic device.
  • FIG. 1 is a schematic diagram of an electronic device to which an embodiment of the present application is applicable;
  • FIG. 2 is a schematic diagram of another electronic device to which an embodiment of the present application is applicable;
  • FIG. 3 is a flowchart of a method for obtaining a spectral curve provided by an embodiment of the present application
  • FIG. 4 is a schematic diagram of inputting a shooting request in the method for obtaining a spectral curve provided by an embodiment of the present application
  • FIG. 5 is another schematic diagram of inputting a shooting request in the method for obtaining a spectral curve provided by an embodiment of the present application
  • FIG. 6 is a schematic diagram of the wavelength of the fill light in the method for obtaining a spectral curve provided by an embodiment of the present application
  • FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • the spectral curve of an object needs to be used; for example, when judging the color of an object, the spectral curve of the object also needs to be used.
  • the red green blue (RGB) image taken by the electronic device under ambient light cannot be used to obtain the spectral curve.
  • the usual method is to use the optical device as a light source to illuminate the object, and to adjust the spectrum of the optical device so that the wavelength of the light passing through the lens of the optical device is different at different times. Perform imaging to obtain images of the same object in different bands. After that, the optical device sends the images to the electronic device, and the electronic device analyzes the images of different wavelength bands to obtain the spectral curve of the object.
  • the optical device images the object based on different wavebands, so as to obtain images of the same object in different wavebands.
  • Most of the optical equipment is a dedicated spectrometer.
  • the spectrometer uses an optical dispersion system, such as a prism, to disperse the incident light into light of different wavelength bands, so that the light of different wavelength bands is used to irradiate the object and image the object.
  • the embodiments of the present application provide a method, electronic device, and chip for obtaining a spectrum curve, which provide light of different wavelength bands through a light supplement device to achieve the purpose of obtaining a spectrum curve of an object.
  • the electronic devices involved in the embodiments of the present application may be devices capable of providing users with voice and/or data connectivity, handheld devices with wireless connection functions, and other processing devices connected to wireless modems.
  • the electronic device may communicate with one or more core networks or the Internet via a radio access network (e.g., radio access network, RAN), and may be a mobile electronic device, such as a mobile phone (or called a "cellular "Phones, mobile phones), computers, and data cards, for example, can be portable, pocket-sized, handheld, computer-built or vehicle-mounted mobile devices, and they exchange language and/or data with the wireless access network.
  • a radio access network e.g., radio access network, RAN
  • a mobile electronic device such as a mobile phone (or called a "cellular "Phones, mobile phones), computers, and data cards, for example, can be portable, pocket-sized, handheld, computer-built or vehicle-mounted mobile devices, and they exchange language and/or data with the wireless access network.
  • Wireless electronic equipment can also be referred to as system, subscriber unit, subscriber station, mobile station, mobile station (MS), remote station (remote station), access point ( access point, AP), remote electronic equipment (remote terminal), access electronic equipment (access terminal), user electronic equipment (user terminal), user agent (user agent), subscriber station (subscriber station, SS), user terminal equipment (customer premises equipment, CPE), terminal (terminal), user equipment (user equipment, UE), mobile terminal (mobile terminal, MT), etc.
  • Wireless electronic devices can also be wearable devices and next-generation communication systems, for example, electronic devices in 5G networks or electronic devices in public land mobile network (PLMN) networks that will evolve in the future, and NR communication systems. Electronic equipment, etc.
  • Fig. 1 is a schematic diagram of an electronic device to which an embodiment of the present application is applicable.
  • the light supplement device is built in the electronic device, and is connected to the same processor as the camera of the electronic device.
  • the user inputs a shooting request through voice and touching the light.
  • the processor controls the exposure sequence of the fill light in the light supplement device according to the shooting request, and controls the camera to shoot the target object according to the exposure sequence , So as to obtain a group of images.
  • the number of images in the group of images is related to the number of light-filling lamps in the light-filling device. Normally, the number of images is one more than the number of light-filling lamps.
  • the group of images includes 5 images, and the 5 images include the images corresponding to each fill light in the 4 fill light lamps, and one fill light The light is off and the image is under ambient light.
  • the group of images includes 4 images, and the 4 images include the images corresponding to each of the 3 fill light lamps, and one fill light lamp. The light is off and the image is under ambient light.
  • Fig. 2 is a schematic diagram of another electronic device to which an embodiment of the present application is applicable.
  • the light supplement device is externally placed on the electronic device, and the light supplement device and the electronic device are connected via a universal serial bus (USB).
  • USB universal serial bus
  • the electronic device After the electronic device receives the shooting request input by the user and determines the exposure sequence according to the shooting request, it needs to send instructions to the light supplement device via USB, etc., so that the light supplement device exposes according to the exposure sequence; at the same time, the electronic device According to the exposure sequence, the target object is photographed to obtain a set of images.
  • Fig. 3 is a flowchart of a method for obtaining a spectral curve provided by an embodiment of the present application. This embodiment is described from the perspective of an electronic device, and this embodiment includes:
  • the electronic device receives a shooting request input by a user.
  • the shooting request is used to request to shoot a group of images
  • the group of images includes a first image and a second image
  • the light source of the first image is a light supplement device and ambient light
  • the second image The light source of is the ambient light
  • the light supplement device includes at least one light supplement lamp
  • different light supplement lamps in the at least one light supplement lamp are used to provide light of different wavelengths.
  • the user can input a shooting request through voice or touch.
  • a shooting request through voice or touch.
  • FIG. 4 is a schematic diagram of inputting a shooting request in the method for acquiring a spectral curve provided by an embodiment of the present application.
  • a “spectral curve” application APP
  • the APP can be an APP that comes with the operating system of the electronic device, or it can be downloaded and installed by the user on the electronic device.
  • the third-party APP on the device.
  • the shooting button is shown as an oval in the figure.
  • FIG. 5 is another schematic diagram of inputting a shooting request in the method for acquiring a spectral curve provided by an embodiment of the present application.
  • the camera of the electronic device has a spectral curve acquisition mode.
  • the user clicks on the camera on the desktop to turn on the camera.
  • the user selects the spectral curve mode and switches the camera to the spectral curve mode.
  • the shooting button is shown as an ellipse in the figure.
  • the electronic device controls the exposure sequence of each fill light in the fill light device according to the shooting request.
  • the order of the light supplement lamps in the light supplement device is pre-stored on the electronic device.
  • the fill light device includes 4 fill lights, namely fill light 1, fill light 2, fill light 3, and fill light 4.
  • the wavelengths provided by the 4 fill lights correspond to the interval range of 620.
  • the wavelength ranges of the light provided by the respective light supplement lamps of the light supplement device are also called different narrowband spectra.
  • the electronic device photographs the target object according to the exposure sequence to obtain the first image and the second image.
  • the electronic device photographs the target object according to the exposure sequence of the fill light in the fill light device to obtain the first image and the second image.
  • the light source of the first image is a light supplement device and ambient light
  • the light source of the second image is ambient light.
  • the light supplement device contains 4 light supplement lamps
  • the electronic device obtains 5 images according to the exposure sequence.
  • the 5 images include: the light supplement light 1 exposure and the image provided by the ambient light, the supplement light Light 2 exposure and ambient light provide illuminated images, fill light 3 exposure and ambient light provide illuminated images, fill light 4 exposure and ambient light provide illuminated images, fill light 1 to 4 are all not exposed but environment Light provides illuminated images.
  • the first 4 images can be called the first image
  • the last image in which all the fill lights are not exposed is called the second image.
  • the exposure speed of each fill light is related to the shooting frame rate of the electronic device.
  • the electronic device determines the spectral curve of the target object according to the first image and the second image.
  • the electronic device removes the second image from each first image to obtain an image illuminated only by the fill light, and then the electronic device obtains the spectrum of the target object based on the images only illuminated by the fill light curve.
  • the electronic device receives a user input requesting a shooting request for shooting a group of images or, according to the shooting request, controls the exposure sequence of each fill light in the fill light device according to the exposure sequence
  • a set of images is obtained, and the set of images includes images that are illuminated by different fill lights and ambient light at the same time and images that are illuminated by only ambient light.
  • the electronic device obtains the spectral curve of the target object according to the images.
  • different wavelengths of light are provided by the fill light to obtain images of different wavelength bands of the target object, and then the spectral curve of the target object is obtained, without the need for a dedicated spectrometer, and the cost is low.
  • it can be provided to ordinary users to use in their daily lives.
  • the process of acquiring the spectral curve does not change the normal photographing architecture of the electronic device.
  • the electronic device determines the spectral curve of the target object based on the first image and the second image, it removes the second image from the first image to obtain the second image with the light source as the supplementary light device. After three images, the electronic device determines the spectral curve of the target object according to the third image.
  • the fill light device includes 4 fill lights, namely fill light 1, fill light 2, fill light 3, and fill light 4.
  • the wavelengths provided by the 4 fill lights correspond to the interval ranges respectively.
  • the electronic device obtains 4 first images and 1 second image
  • the light sources of the 4 first images are fill light 1+ambient light, fill light 2+ambient light, fill light 3+ambient light, fill light 4+ambient light
  • the light source of the second image is ambient light.
  • the electronic device uses technologies such as high-dynamic range (HDR) to remove the second image from the four first images, and the light sources are respectively fill light 1, fill light 2, fill light 3 and 4 third images of fill light 4. Then, the electronic device determines the spectral curve of the target object according to the third images.
  • HDR high-dynamic range
  • the electronic device obtains a third image by removing the second image from each first image, and uses each third image to determine the spectral curve of the target object to achieve the purpose of obtaining the spectral curve of the target object.
  • the electronic device performs interpolation processing on the third image corresponding to each of the at least one fill light to obtain the spectral curve of the target object.
  • the electronic device combines the spectral response function of an image sensor (sensor) of the camera of the electronic device to perform interpolation processing on each third image to obtain the spectral curve of the target object.
  • the spectral curve of the target object is obtained through an interpolation algorithm, so as to achieve the purpose of obtaining the spectral curve of the target object.
  • the difference between the wavelengths of two adjacent fill lamps in the above exposure sequence is a preset difference.
  • FIG. 6, is a schematic diagram of the wavelength of the fill light in the method for obtaining a spectrum curve provided by an embodiment of the present application.
  • the light supplement device includes 4 light supplement lamps, namely supplement light 1, supplement light 2, supplement light 3 and supplement light 4.
  • the exposure sequence is supplement light 1, supplement light 2,
  • the light of each fill light can be decomposed into three colors of red (red), green (green), and blue (blue).
  • the blue light is shown by the solid line in the figure
  • the green light is shown by the dotted line in the figure
  • the red light is shown by the dotted line in the figure.
  • the difference between the wavelengths of the supplementary lights is X, that is, each supplementary light is distributed in the entire spectrum interval in steps of X, so that the Fill light can obtain narrow-band spectral images in the entire spectral range.
  • the entire spectrum interval of the supplemental light device is, for example, the visible light spectrum and the ultraviolet spectrum.
  • the wavelength difference between two adjacent fill light lamps in the exposure sequence is a preset threshold
  • the wavelengths provided by the fill light device are distributed in the entire frequency spectrum.
  • the first image and the second image are RGB images in the visible light frequency band of the supplementary light frequency band of the above-mentioned supplementary light device; or, the supplementary light frequency band of the above-mentioned supplementary light device is the infrared frequency band, then the first image And the second image is a red green blue infrared (RGB-IR) image.
  • RGB-IR red green blue infrared
  • the supplement light frequency of the light supplement device is in the visible light frequency band
  • the supplement light frequency of the light supplement device is the infrared frequency band. What kind of images the camera of an electronic device can capture depends on the pixels of the camera's sensor.
  • the supplemental light frequency band of the supplemental light device may be a visible light frequency band or an infrared frequency band, so as to achieve the purpose of flexibly acquiring spectral images according to requirements.
  • FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Please refer to FIG. 7.
  • the electronic device 100 provided by an embodiment of the present application includes a processor 11, a memory 12, and is stored on the memory 12 and can A computer program running on the processor 11, when the processor 11 executes the program, the following steps are executed:
  • the photographing request is used to request to photograph a group of images, the group of images includes a first image and a second image, and the light source of the first image is a supplementary light device and ambient light, The light source of the second image is the ambient light, the light supplement device includes at least one light supplement lamp, and different light supplement lamps in the at least one light supplement lamp are used to provide light of different wavelengths;
  • the spectral curve of the target object is determined.
  • the determining the spectral curve of the target object according to the first image and the second image includes:
  • the spectral curve of the target object is determined.
  • the determining the spectral curve of the target object according to the third image includes:
  • the difference between the wavelengths of two adjacent fill lights in the exposure sequence is a preset difference.
  • the compensation light frequency band of the light compensation device is a visible light frequency band
  • the first image and the second image are red, green, and blue RGB images
  • the supplemental light frequency band of the supplementary light device is an infrared frequency band, and the first image and the second image are red, green, and blue infrared RGB-IR images.
  • the light supplement device is built in the electronic equipment; or, the light supplement device is externally built in the electronic equipment.
  • the electronic device provided in the embodiment of the present application can perform the actions of the electronic device in the foregoing method embodiment, and its implementation principles and technical effects are similar, and will not be repeated here.
  • FIG. 8 is a schematic structural diagram of a chip provided by an embodiment of the present application. Please refer to FIG. 8.
  • the chip 200 provided by an embodiment of the present application includes a processor 21 and an interface 22.
  • the interface 22 is used to receive code instructions and transmit To the processor 21, the processor 21 runs the code instructions to perform the following steps:
  • the photographing request is used to request to photograph a group of images, the group of images includes a first image and a second image, and the light source of the first image is a supplementary light device and ambient light, The light source of the second image is the ambient light, the light supplement device includes at least one light supplement lamp, and different light supplement lamps in the at least one light supplement lamp are used to provide light of different wavelengths;
  • the spectral curve of the target object is determined.
  • the determining the spectral curve of the target object according to the first image and the second image includes:
  • the spectral curve of the target object is determined.
  • the determining the spectral curve of the target object according to the third image includes:
  • the difference between the wavelengths of two adjacent fill lights in the exposure sequence is a preset difference.
  • the compensation light frequency band of the light compensation device is a visible light frequency band
  • the first image and the second image are red, green, and blue RGB images
  • the supplemental light frequency band of the supplementary light device is an infrared frequency band, and the first image and the second image are red, green, and blue infrared RGB-IR images.
  • the light supplement device is built in the electronic equipment; or, the light supplement device is externally built in the electronic equipment.
  • the chip provided in the embodiment of the present application can execute the actions of the electronic device in the foregoing method embodiment when running code instructions, and its implementation principles and technical effects are similar, and will not be repeated here.
  • the embodiments of the present application also provide a computer program product containing instructions, which when run on an electronic device, causes the electronic device to perform the actions of the electronic device in any of the foregoing embodiments. Its implementation principle and technical effect are similar, so it will not be repeated here.
  • the embodiments of the present application also provide a computer-readable storage medium having instructions stored in the computer-readable storage medium, which when running on an electronic device, cause the electronic device to execute any of the above
  • the actions of the electronic device in the embodiment are similar in implementation principles and technical effects, and will not be repeated here.
  • the embodiment of the present application may divide the electronic device into functional modules according to the foregoing method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • plural herein refers to two or more.
  • the term “and/or” in this article is only an association relationship describing associated objects, which means that there can be three types of relationships, for example, A and/or B can mean: A alone exists, A and B exist at the same time, exist alone B these three situations.
  • the character “/" in this article generally indicates that the associated objects before and after are in an “or” relationship; in the formula, the character "/" indicates that the associated objects before and after are in a "division" relationship.
  • the size of the sequence numbers of the foregoing processes does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not be implemented in this application.
  • the implementation process of the example constitutes any limitation.
  • the memory may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or a volatile memory. (volatile memory), such as random-access memory (random-access memory, RAM).
  • the memory is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
  • the memory in the embodiments of the present application may also be a circuit or any other device capable of realizing a storage function, for storing program instructions and/or data.
  • the disclosed device and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be other division methods for example, multiple units or components may be It can be combined or integrated into another device, or some features can be omitted or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate parts may or may not be physically separate.
  • the parts displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed to multiple different places. . Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the methods provided in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software When implemented by software, it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a dedicated computer, a computer network, a second network node, a terminal, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital video disc (digital video disc, DVD)), or a semiconductor medium (for example, SSD).

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Color Television Image Signal Generators (AREA)
  • Studio Devices (AREA)
  • Image Input (AREA)

Abstract

Provided in the present application are a spectral curve acquiring method, an electronic device, and a chip. The electronic device receives a photographing request inputted by a user requesting to photograph a set of images, controls the order of exposure of supplementary lights in a supplementary lighting device on the basis of the photographing request, and produces a set of images on the basis of the order of exposure, the set of images comprising an image for which lighting is provided simultaneously by the different supplementary lights and the ambient light and an image for which lighting is provided solely by the ambient light. Then, the electronic device obtains a spectral curve of a target object on the basis of the images. In the process, with the supplementary lights providing lights of different wavelengths, images of different wave bands of the target object are produced, thus acquiring the spectral curve of the target object, obviating the need for a dedicated spectrometer, and making costs inexpensive. Moreover, this can be provided to general users for use in daily life. In addition, the process of acquiring the spectral curve does not alter the architecture of the electronic device for normal photographing.

Description

光谱曲线获取方法、电子设备及芯片Method for obtaining spectrum curve, electronic equipment and chip

本申请要求在2019年6月6日提交中国国家知识产权局、申请号为201910493020.X的中国专利申请的优先权,发明名称为“光谱曲线获取方法、电子设备及芯片”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of a Chinese patent application filed with the State Intellectual Property Office of China with the application number 201910493020.X, and the Chinese patent application with the title of the invention titled "Method for obtaining spectral curve, electronic equipment and chip" on June 6, 2019 Priority, the entire content of which is incorporated in this application by reference.

技术领域Technical field

本申请实施例涉及光谱分析技术领域,尤其涉及一种光谱曲线获取方法、电子设备及芯片。The embodiments of the present application relate to the field of spectral analysis technology, and in particular to a method for obtaining a spectral curve, electronic equipment, and a chip.

背景技术Background technique

随着技术的不断发展,越来越多的电子设备具备拍照功能。与此同时,为了满足后端智能应用的需求,要求电子设备除了具备拍摄高质量图像的功能外,还要求电子设备具备光谱分析能力,能够获取到物体的光谱曲线。With the continuous development of technology, more and more electronic devices have camera functions. At the same time, in order to meet the needs of back-end smart applications, electronic devices are required to have the ability to capture high-quality images, as well as to have spectral analysis capabilities to be able to obtain the spectral curve of the object.

传统获取光谱曲线的过程中,将光学设备作为光源对物体进行照射,通过对光学设备进行光谱调整,使得不同时间通过光学设备镜头的光的波段不同,从而在不同时间段利用不同波段的光照射同一个物体,光学设备在不同时间段对该物体成像,可以得到同一物体不同波段的图像。之后,光学设备将该些不同波段的图像发送给电子设备,由电子设备对该些不同波段的图像进行分析,从而得到该物体的光谱曲线。In the traditional process of acquiring the spectrum curve, the optical device is used as the light source to illuminate the object. By adjusting the optical device spectrum, the wavelength of the light passing through the lens of the optical device is different at different times, so that different wavelengths of light are used for irradiation For the same object, the optical equipment images the object in different time periods, and images of the same object in different bands can be obtained. After that, the optical device sends the images of these different wavebands to the electronic device, and the electronic device analyzes the images of the different wavebands to obtain the spectral curve of the object.

然而,上述的光学设备大多为专用的光谱仪等,使用范围受限,价格高昂。因此,如何获取物体的光谱曲线,实为业界急待解决的问题。However, most of the above-mentioned optical devices are dedicated spectrometers, etc., with limited use range and high prices. Therefore, how to obtain the spectral curve of an object is an urgent problem in the industry.

发明内容Summary of the invention

本申请实施例提供一种光谱曲线获取方法、电子设备及芯片,通过补光装置提供不同波段的光,实现获取物体的光谱曲线的目的。The embodiments of the present application provide a method for obtaining a spectrum curve, an electronic device, and a chip, and a light supplement device provides light of different wavelength bands to achieve the purpose of obtaining a spectrum curve of an object.

第一方面,本申请实施例提供一种光谱曲线获取方法,该方法可以应用于电子设备、也可以应用于电子设备中的芯片。下面以应用于电子设备为例对该方法进行描述,该方法包括:电子设备接收用户输入的拍摄请求,该拍摄请求用于请求拍摄一组图像,该一组图像包含第一图像和第二图像,其中,第一图像的光源为补光装置和环境光,第二图像的光源为环境光,补光装置包含至少一个补光灯,该至少一个补光灯中不同的补光灯用于提供不同波长的光;电子设备根据拍摄请求,控制补光装置中各补光灯的曝光顺序;根据该曝光顺序,对目标对象进行拍摄,得到第一图像和第二图像;子设备根据第一图像和第二图像,确定目标对象的光谱曲线。采用该种方案,电子设备接收到用户输入的请求拍摄一组图像的拍摄请求或,根据该拍摄请求,控制补光装置中各补光灯的曝光顺序,根据曝光顺序得到一组图像,该组图像包括由不同补光灯和环境光同时提供光照的图像和仅由环境光提供光照的图像。之后,电子设备根据该些图像得到目标对象的光谱曲线。该过程中,由补光灯提供不同波长的光,得到目标对象不同波段的图像,进而获得目标对象的光谱曲线,无需专用的光谱仪,成本低廉。 而且,可以提供给普通用户在日常生活中使用。另外,该光谱曲线的获取过程不改变电子设备正常拍照的架构。In the first aspect, an embodiment of the present application provides a method for obtaining a spectral curve, which can be applied to an electronic device or a chip in an electronic device. The method is described below by taking an electronic device as an example. The method includes: the electronic device receives a shooting request input by a user, and the shooting request is used to request to shoot a group of images, and the group of images includes a first image and a first image. Two images, where the light source of the first image is a light supplement device and ambient light, the light source of the second image is ambient light, and the light supplement device includes at least one light supplement lamp, and different light supplement lamps in the at least one light supplement light To provide light of different wavelengths; the electronic equipment controls the exposure sequence of each fill light in the fill light device according to the shooting request; according to the exposure sequence, the target object is photographed to obtain the first image and the second image; One image and the second image determine the spectral curve of the target object. With this solution, the electronic device receives a shooting request input by the user requesting to shoot a group of images or, according to the shooting request, controls the exposure sequence of each fill light in the fill light device, and obtains a set of images according to the exposure sequence. The group of images includes images that are illuminated by different fill lights and ambient light at the same time, and images that are illuminated by only ambient light. Then, the electronic device obtains the spectral curve of the target object according to the images. In this process, different wavelengths of light are provided by the fill light to obtain images of different wavelength bands of the target object, and then the spectral curve of the target object is obtained, without the need for a dedicated spectrometer, and the cost is low. Moreover, it can be provided to ordinary users to use in their daily lives. In addition, the process of acquiring the spectral curve does not change the normal photographing architecture of the electronic device.

一种可行的设计中,电子设备根据第一图像和第二图像,确定目标对象的光谱曲线时,从第一图像中去除第二图像,得到光源为补光装置的第三图像;然后根据该第三图像,确定目标对象的光谱曲线。采用该种方案,电子设备通过从各第一图像中除去第二图像,得到第三图像,并利用各第三图像确定目标对象的光谱曲线,实现获取目标对象的光谱曲线的目的。In a feasible design, when the electronic device determines the spectral curve of the target object based on the first image and the second image, it removes the second image from the first image to obtain a third image whose light source is a light supplement device; The third image determines the spectral curve of the target object. With this solution, the electronic device obtains a third image by removing the second image from each first image, and uses each third image to determine the spectral curve of the target object, so as to achieve the purpose of obtaining the spectral curve of the target object.

一种可行的设计中,电子设备根据第三图像,确定目标对象的光谱曲线时,对至少一个补光灯中各补光灯对应的第三图像进行插值处理,得到目标对象的光谱曲线。采用该种方案,通过插值算法得到目标对象的光谱曲线,实现获取目标对象的光谱曲线的目的。In a feasible design, when the electronic device determines the spectral curve of the target object according to the third image, it performs interpolation processing on the third image corresponding to each of the at least one fill light to obtain the spectral curve of the target object. With this scheme, the spectral curve of the target object is obtained through an interpolation algorithm, so as to achieve the purpose of obtaining the spectral curve of the target object.

一种可行的设计中,曝光顺序中相邻两个补光灯的波长的差值为预设差值。采用该种方案,由于曝光顺序中相邻两个补光灯的波长的差值为预设阈值,使得补光装置能提供的波长分布在整个频谱区间。In a feasible design, the difference between the wavelengths of two adjacent fill lamps in the exposure sequence is a preset difference. With this solution, since the wavelength difference between two adjacent fill light lamps in the exposure sequence is a preset threshold, the wavelengths provided by the fill light device are distributed in the entire frequency spectrum.

一种可行的设计中,补光装置的补光频段可见光频段,第一图像和第二图像为红绿蓝RGB图像;或者,补光装置的补光频段为红外线频段,第一图像和第二图像为红绿蓝红外RGB-IR图像。采用该种方案,补光装置的补光频段可以为可见光频段或红外线频段,实现灵活根据需求获取光谱图像的目的。In a feasible design, the supplementary light frequency band of the supplementary light device is visible light frequency band, the first image and the second image are red, green and blue RGB images; or the supplementary light frequency band of the supplementary light device is infrared frequency band, and the first image and the second The image is a red, green, blue infrared RGB-IR image. With this solution, the supplementary light frequency band of the supplementary light device can be a visible light frequency band or an infrared frequency band, achieving the purpose of flexibly acquiring spectral images according to requirements.

一种可行的设计中,补光装置为内置于电子设备;或者,补光装置外置于电子设备。In a feasible design, the light supplement device is built into the electronic device; or the light supplement device is externally placed on the electronic device.

第二方面,本申请实施例提供一种电子设备,包括:处理器、存储器,以及存储在该存储器上并可在该处理器上运行的计算机程序,处理器执行程序时执行如下步骤:接收用户输入的拍摄请求,该拍摄请求用于请求拍摄一组图像,该一组图像包含第一图像和第二图像,第一图像的光源为补光装置和环境光,第二图像的光源为环境光,补光装置包含至少一个补光灯,该至少一个补光灯中不同的补光灯用于提供不同波长的光;根据拍摄请求,控制补光装置中各补光灯的曝光顺序;根据曝光顺序,对目标对象进行拍摄,得到第一图像和第二图像;根据第一图像和第二图像,确定目标对象的光谱曲线。采用该种方案,电子设备接收到用户输入的请求拍摄一组图像的拍摄请求或,根据该拍摄请求,控制补光装置中各补光灯的曝光顺序,根据曝光顺序得到一组图像,该组图像包括由不同补光灯和环境光同时提供光照的图像和仅由环境光提供光照的图像。之后,电子设备根据该些图像得到目标对象的光谱曲线。该过程中,由补光灯提供不同波长的光,得到目标对象不同波段的图像,进而获得目标对象的光谱曲线,无需专用的光谱仪,成本低廉。而且,可以提供给普通用户在日常生活中使用。另外,该光谱曲线的获取过程不改变电子设备正常拍照的架构。In a second aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and running on the processor. The processor executes the following steps when the program is executed: receiving a user The input shooting request, the shooting request is used to request to shoot a group of images, the group of images includes the first image and the second image, the light source of the first image is the light supplement device and the ambient light, and the light source of the second image is For ambient light, the light-filling device includes at least one light-filling lamp, and different light-filling lamps in the at least one light-filling lamp are used to provide light of different wavelengths; according to the shooting request, controlling the exposure sequence of the light-filling lamps in the light-filling device; According to the exposure sequence, the target object is photographed to obtain the first image and the second image; according to the first image and the second image, the spectral curve of the target object is determined. With this solution, the electronic device receives a shooting request input by the user requesting to shoot a group of images or, according to the shooting request, controls the exposure sequence of each fill light in the fill light device, and obtains a set of images according to the exposure sequence. The group of images includes images that are illuminated by different fill lights and ambient light at the same time, and images that are illuminated by only ambient light. Then, the electronic device obtains the spectral curve of the target object according to the images. In this process, different wavelengths of light are provided by the fill light to obtain images of different wavelength bands of the target object, and then the spectral curve of the target object is obtained, without the need for a dedicated spectrometer, and the cost is low. Moreover, it can be provided to ordinary users to use in their daily lives. In addition, the process of acquiring the spectral curve does not change the normal photographing architecture of the electronic device.

一种可行的设计中,电子设备根据第一图像和第二图像,确定目标对象的光谱曲线时,从第一图像中去除第二图像,得到光源为补光装置的第三图像;然后根据该第三图像,确定目标对象的光谱曲线。采用该种方案,电子设备通过从各第一图像中除去第二图像,得到第三图像,并利用各第三图像确定目标对象的光谱曲线,实现获取目标对象的光谱曲线的目的。In a feasible design, when the electronic device determines the spectral curve of the target object based on the first image and the second image, it removes the second image from the first image to obtain a third image whose light source is a light supplement device; The third image determines the spectral curve of the target object. With this solution, the electronic device obtains a third image by removing the second image from each first image, and uses each third image to determine the spectral curve of the target object, so as to achieve the purpose of obtaining the spectral curve of the target object.

一种可行的设计中,电子设备根据第三图像,确定目标对象的光谱曲线时,对至少一个补光灯中各补光灯对应的第三图像进行插值处理,得到目标对象的光谱曲线。采用该种 方案,通过插值算法得到目标对象的光谱曲线,实现获取目标对象的光谱曲线的目的。In a feasible design, when the electronic device determines the spectral curve of the target object according to the third image, it performs interpolation processing on the third image corresponding to each of the at least one fill light to obtain the spectral curve of the target object. Using this scheme, the spectral curve of the target object is obtained through the interpolation algorithm, and the purpose of obtaining the spectral curve of the target object is achieved.

一种可行的设计中,曝光顺序中相邻两个补光灯的波长的差值为预设差值。采用该种方案,由于曝光顺序中相邻两个补光灯的波长的差值为预设阈值,使得补光装置能提供的波长分布在整个频谱区间。In a feasible design, the difference between the wavelengths of two adjacent fill lamps in the exposure sequence is a preset difference. With this solution, since the wavelength difference between two adjacent fill light lamps in the exposure sequence is a preset threshold, the wavelengths provided by the fill light device are distributed in the entire frequency spectrum.

一种可行的设计中,补光装置的补光频段可见光频段,第一图像和第二图像为红绿蓝RGB图像;或者,补光装置的补光频段为红外线频段,第一图像和第二图像为红绿蓝红外RGB-IR图像。采用该种方案,补光装置的补光频段可以为可见光频段或红外线频段,实现灵活根据需求获取光谱图像的目的。In a feasible design, the supplementary light frequency band of the supplementary light device is visible light frequency band, the first image and the second image are red, green and blue RGB images; or the supplementary light frequency band of the supplementary light device is infrared frequency band, and the first image and the second The image is a red, green, blue infrared RGB-IR image. With this solution, the supplementary light frequency band of the supplementary light device can be a visible light frequency band or an infrared frequency band, achieving the purpose of flexibly acquiring spectral images according to requirements.

一种可行的设计中,补光装置为内置于电子设备;或者,补光装置外置于电子设备。In a feasible design, the light supplement device is built into the electronic device; or the light supplement device is externally placed on the electronic device.

第三方面,本申请实施例提供一种芯片,该芯片包括处理器和接口,该接口用于接收代码指令,并传输至处理器,处理器运行代码指令以执行以下步骤:接收用户输入的拍摄请求,该拍摄请求用于请求拍摄一组图像,该一组图像包含第一图像和第二图像,其中,第一图像的光源为补光装置和环境光,第二图像的光源为环境光,补光装置包含至少一个补光灯,至少一个补光灯中不同的补光灯用于提供不同波长的光;根据拍摄请求,控制补光装置中各补光灯的曝光顺序;根据曝光顺序,对目标对象进行拍摄,得到第一图像和第二图像;根据第一图像和第二图像,确定目标对象的光谱曲采用该种方案,电子设备接收到用户输入的请求拍摄一组图像的拍摄请求或,根据该拍摄请求,控制补光装置中各补光灯的曝光顺序,根据曝光顺序得到一组图像,该组图像包括由不同补光灯和环境光同时提供光照的图像和仅由环境光提供光照的图像。之后,电子设备根据该些图像得到目标对象的光谱曲线。该过程中,由补光灯提供不同波长的光,得到目标对象不同波段的图像,进而获得目标对象的光谱曲线,无需专用的光谱仪,成本低廉。而且,可以提供给普通用户在日常生活中使用。另外,该光谱曲线的获取过程不改变电子设备正常拍照的架构。In a third aspect, an embodiment of the present application provides a chip that includes a processor and an interface. The interface is used to receive code instructions and transmit them to the processor. The processor runs the code instructions to perform the following steps: Request, the shooting request is used to request to shoot a group of images, the group of images contains a first image and a second image, where the light source of the first image is the light supplement device and the ambient light, and the light source of the second image is the environment The fill light device includes at least one fill light, and different fill lights in the at least one fill light are used to provide light of different wavelengths; according to the shooting request, control the exposure sequence of each fill light in the fill light device; according to the exposure Sequentially, the target object is photographed to obtain the first image and the second image; according to the first image and the second image, the spectral curve of the target object is determined. With this scheme, the electronic device receives a user input request to take a group of images According to the shooting request or, according to the shooting request, control the exposure sequence of each fill light in the fill light device, and obtain a set of images according to the exposure sequence. The set of images includes images that are simultaneously illuminated by different fill lights and ambient light And an image illuminated only by ambient light. Then, the electronic device obtains the spectral curve of the target object according to the images. In this process, different wavelengths of light are provided by the fill light to obtain images of different wavelength bands of the target object, and then the spectral curve of the target object is obtained, without the need for a dedicated spectrometer, and the cost is low. Moreover, it can be provided to ordinary users to use in their daily lives. In addition, the process of acquiring the spectral curve does not change the normal photographing architecture of the electronic device.

一种可行的设计中,电子设备根据第一图像和第二图像,确定目标对象的光谱曲线时,从第一图像中去除第二图像,得到光源为补光装置的第三图像;然后根据该第三图像,确定目标对象的光谱曲线。采用该种方案,电子设备通过从各第一图像中除去第二图像,得到第三图像,并利用各第三图像确定目标对象的光谱曲线,实现获取目标对象的光谱曲线的目的。In a feasible design, when the electronic device determines the spectral curve of the target object based on the first image and the second image, it removes the second image from the first image to obtain a third image whose light source is a light supplement device; The third image determines the spectral curve of the target object. With this solution, the electronic device obtains a third image by removing the second image from each first image, and uses each third image to determine the spectral curve of the target object, so as to achieve the purpose of obtaining the spectral curve of the target object.

一种可行的设计中,电子设备根据第三图像,确定目标对象的光谱曲线时,对至少一个补光灯中各补光灯对应的第三图像进行插值处理,得到目标对象的光谱曲线。采用该种方案,通过插值算法得到目标对象的光谱曲线,实现获取目标对象的光谱曲线的目的。In a feasible design, when the electronic device determines the spectral curve of the target object according to the third image, it performs interpolation processing on the third image corresponding to each of the at least one fill light to obtain the spectral curve of the target object. With this scheme, the spectral curve of the target object is obtained through an interpolation algorithm, so as to achieve the purpose of obtaining the spectral curve of the target object.

一种可行的设计中,曝光顺序中相邻两个补光灯的波长的差值为预设差值。采用该种方案,由于曝光顺序中相邻两个补光灯的波长的差值为预设阈值,使得补光装置能提供的波长分布在整个频谱区间。In a feasible design, the difference between the wavelengths of two adjacent fill lamps in the exposure sequence is a preset difference. With this solution, since the wavelength difference between two adjacent fill light lamps in the exposure sequence is a preset threshold, the wavelengths provided by the fill light device are distributed in the entire frequency spectrum.

一种可行的设计中,补光装置的补光频段可见光频段,第一图像和第二图像为红绿蓝RGB图像;或者,补光装置的补光频段为红外线频段,第一图像和第二图像为红绿蓝红外RGB-IR图像。采用该种方案,补光装置的补光频段可以为可见光频段或红外线频段,实现灵活根据需求获取光谱图像的目的。In a feasible design, the supplementary light frequency band of the supplementary light device is visible light frequency band, the first image and the second image are red, green and blue RGB images; or the supplementary light frequency band of the supplementary light device is infrared frequency band, and the first image and the second The image is a red, green, blue infrared RGB-IR image. With this solution, the supplementary light frequency band of the supplementary light device can be a visible light frequency band or an infrared frequency band, achieving the purpose of flexibly acquiring spectral images according to requirements.

一种可行的设计中,补光装置为内置于电子设备;或者,补光装置外置于电子设备。In a feasible design, the light supplement device is built into the electronic device; or the light supplement device is externally placed on the electronic device.

第四方面,本申请实施例提供一种包含指令的计算机程序产品,当其在电子设备上运行时,使得电子设备执行上述第一方面或第一方面的各种可能的实现方式中的方法。In a fourth aspect, an embodiment of the present application provides a computer program product containing instructions, which when run on an electronic device, causes the electronic device to execute the foregoing first aspect or the methods in the various possible implementation manners of the first aspect.

第五方面,本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在电子设备上运行时,使得电子设备执行上述第一方面或第一方面的各种可能的实现方式中的方法。In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium that stores instructions in the computer-readable storage medium, and when it runs on an electronic device, the electronic device executes the first aspect or the first aspect described above. Methods in various possible implementations.

本申请实施例提供的光谱曲线获取方法、电子设备及芯片,电子设备接收到用户输入的请求拍摄一组图像的拍摄请求或,根据该拍摄请求,控制补光装置中各补光灯的曝光顺序,根据曝光顺序得到一组图像,该组图像包括由不同补光灯和环境光同时提供光照的图像和仅由环境光提供光照的图像。之后,电子设备根据该些图像得到目标对象的光谱曲线。该过程中,由补光灯提供不同波长的光,得到目标对象不同波段的图像,进而获得目标对象的光谱曲线,无需专用的光谱仪,成本低廉。而且,可以提供给普通用户在日常生活中使用。另外,该光谱曲线的获取过程不改变电子设备正常拍照的架构。The spectral curve acquisition method, electronic device and chip provided by the embodiments of the present application, the electronic device receives a user input request to shoot a group of images or, according to the shooting request, controls the exposure of each fill light in the fill light device Sequence: According to the exposure sequence, a set of images is obtained. The set of images includes images that are illuminated by different fill lights and ambient light at the same time and images that are illuminated by only ambient light. Then, the electronic device obtains the spectral curve of the target object according to the images. In this process, different wavelengths of light are provided by the fill light to obtain images of different wavelength bands of the target object, and then the spectral curve of the target object is obtained, without the need for a dedicated spectrometer, and the cost is low. Moreover, it can be provided to ordinary users to use in their daily lives. In addition, the process of acquiring the spectral curve does not change the normal photographing architecture of the electronic device.

附图说明Description of the drawings

图1是本申请实施例所适用的一种电子设备的示意图;FIG. 1 is a schematic diagram of an electronic device to which an embodiment of the present application is applicable;

图2是本申请实施例所适用的另一种电子设备的示意图;FIG. 2 is a schematic diagram of another electronic device to which an embodiment of the present application is applicable;

图3是本申请实施例提供的一种光谱曲线获取方法的流程图;FIG. 3 is a flowchart of a method for obtaining a spectral curve provided by an embodiment of the present application;

图4是本申请实施例提供的光谱曲线获取方法中输入拍摄请求的一种示意图;4 is a schematic diagram of inputting a shooting request in the method for obtaining a spectral curve provided by an embodiment of the present application;

图5是本申请实施例提供的光谱曲线获取方法中输入拍摄请求的另一种示意图;FIG. 5 is another schematic diagram of inputting a shooting request in the method for obtaining a spectral curve provided by an embodiment of the present application;

图6是本申请实施例提供的光谱曲线获取方法中补光灯的波长示意图;6 is a schematic diagram of the wavelength of the fill light in the method for obtaining a spectral curve provided by an embodiment of the present application;

图7是本申请实施例提供的一种电子设备的结构示意图;FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;

图8是本申请实施例提供的一种芯片的结构示意图。FIG. 8 is a schematic structural diagram of a chip provided by an embodiment of the present application.

具体实施方式Detailed ways

目前,很多场景需要获取物体的光谱曲线,例如,在对物体成分进行分析时,需要用到物体的光谱曲线;再如,对物体进行色彩判断时也需要用到物体的光谱曲线。此时,电子设备在环境光照下拍摄出的红绿蓝(red green blue,RGB)图像无法用于光谱曲线的获取。为了获取到物体的光谱曲线,通常的做法是将光学设备作为光源对物体进行照射,对光学设备进行光谱调整,使得不同时间通过光学设备镜头的光的波段不同,光学设备在不同时间对该物体进行成像,从而得到同一物体不同波段的图像。之后,光学设备将该些图像发送给电子设备,由电子设备对该些不同波段的图像进行分析,从而得到物体的光谱曲线。At present, many scenes need to obtain the spectral curve of an object. For example, when analyzing the composition of an object, the spectral curve of the object needs to be used; for example, when judging the color of an object, the spectral curve of the object also needs to be used. At this time, the red green blue (RGB) image taken by the electronic device under ambient light cannot be used to obtain the spectral curve. In order to obtain the spectral curve of the object, the usual method is to use the optical device as a light source to illuminate the object, and to adjust the spectrum of the optical device so that the wavelength of the light passing through the lens of the optical device is different at different times. Perform imaging to obtain images of the same object in different bands. After that, the optical device sends the images to the electronic device, and the electronic device analyzes the images of different wavelength bands to obtain the spectral curve of the object.

上述获取光谱曲线的过程中,由光学设备基于不同波段对物体进行成像,从而得到同一物体不同波段的图像。该光学设备大多为专用的光谱仪等,光谱仪利用光学的色散系统,如棱镜等将入射光分散为不同波段的光,从而利用不同波段的光对物体进行照射并对物体进行成像。In the above process of obtaining the spectral curve, the optical device images the object based on different wavebands, so as to obtain images of the same object in different wavebands. Most of the optical equipment is a dedicated spectrometer. The spectrometer uses an optical dispersion system, such as a prism, to disperse the incident light into light of different wavelength bands, so that the light of different wavelength bands is used to irradiate the object and image the object.

然而,由于光学设备大多为专用的光谱仪等,使用范围受限,价格高昂,无法提供给普通用户。因此,如何获取物体的光谱曲线,实为业界急待解决的问题。However, since most optical devices are dedicated spectrometers, etc., their use range is limited and the price is high, and they cannot be provided to ordinary users. Therefore, how to obtain the spectral curve of an object is an urgent problem in the industry.

有鉴于此,本申请实施例提供一种光谱曲线获取方法、电子设备及芯片,通过补光装置提供不同波段的光,实现获取物体的光谱曲线的目的。In view of this, the embodiments of the present application provide a method, electronic device, and chip for obtaining a spectrum curve, which provide light of different wavelength bands through a light supplement device to achieve the purpose of obtaining a spectrum curve of an object.

本申请实施例中涉及的电子设备,可以是能够向用户提供语音和/或数据连通性的设备、具有无线连接功能的手持式设备、连接到无线调制解调器的其他处理设备。本申请实施例中,电子设备可以经无线接入网(如,radio access network,RAN)与一个或多个核心网或者互联网进行通信,可以是移动电子设备,如移动电话(或称为“蜂窝”电话,手机(mobile phone))、计算机和数据卡,例如,可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置,它们与无线接入网交换语言和/或数据。例如,个人通信业务(personal communication service,PCS)电话、无绳电话、会话发起协议(SIP)话机、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、平板电脑(Pad)、带无线收发功能的电脑等设备。无线电子设备也可以称为系统、订户单元(subscriber unit)、订户站(subscriber station),移动站(mobile station)、移动台(mobile station,MS)、远程站(remote station)、接入点(access point,AP)、远程电子设备(remote terminal)、接入电子设备(access terminal)、用户电子设备(user terminal)、用户代理(user agent)、用户站(subscriber station,SS)、用户端设备(customer premises equipment,CPE)、终端(terminal)、用户设备(user equipment,UE)、移动终端(mobile terminal,MT)等。无线电子设备也可以是可穿戴设备以及下一代通信系统,例如,5G网络中的电子设备或者未来演进的公共陆地移动网络(public land mobile network,PLMN)网络中的电子设备,NR通信系统中的电子设备等。The electronic devices involved in the embodiments of the present application may be devices capable of providing users with voice and/or data connectivity, handheld devices with wireless connection functions, and other processing devices connected to wireless modems. In the embodiments of this application, the electronic device may communicate with one or more core networks or the Internet via a radio access network (e.g., radio access network, RAN), and may be a mobile electronic device, such as a mobile phone (or called a "cellular "Phones, mobile phones), computers, and data cards, for example, can be portable, pocket-sized, handheld, computer-built or vehicle-mounted mobile devices, and they exchange language and/or data with the wireless access network. For example, personal communication service (PCS) phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), tablets Computer (Pad), computer with wireless transceiver function and other equipment. Wireless electronic equipment can also be referred to as system, subscriber unit, subscriber station, mobile station, mobile station (MS), remote station (remote station), access point ( access point, AP), remote electronic equipment (remote terminal), access electronic equipment (access terminal), user electronic equipment (user terminal), user agent (user agent), subscriber station (subscriber station, SS), user terminal equipment (customer premises equipment, CPE), terminal (terminal), user equipment (user equipment, UE), mobile terminal (mobile terminal, MT), etc. Wireless electronic devices can also be wearable devices and next-generation communication systems, for example, electronic devices in 5G networks or electronic devices in public land mobile network (PLMN) networks that will evolve in the future, and NR communication systems. Electronic equipment, etc.

图1是本申请实施例所适用的一种电子设备的示意图。请参照图1,本实施例中,补光装置内置于电子设备,与电子设备的摄像头等连接在同一个处理器上。光谱曲线获取过程中,用户通过语音、触摸灯方式输入拍摄请求,处理器根据该拍摄请求,控制补光装置中各补光灯的曝光顺序,并控制摄像头根据该曝光顺序,对目标对象进行拍摄,从而得到一组图像,该组图像中图像的数量和补光装置中补光灯的数量相关,通常情况下,图像的数量比补光灯的数量多一个。例如,补光装置中补光灯的数量为4个,则该组图像包括5幅图像,该5幅图像包括4个补光灯中各补光灯分别对应的图像,以及一幅补光灯关闭、环境光下的图像。再如,补光装置中补光灯的数量为3个,则该组图像包括4幅图像,该4幅图像包括3个补光灯中各补光灯分别对应的图像,以及一幅补光灯关闭、环境光下的图像。Fig. 1 is a schematic diagram of an electronic device to which an embodiment of the present application is applicable. Please refer to FIG. 1. In this embodiment, the light supplement device is built in the electronic device, and is connected to the same processor as the camera of the electronic device. In the process of acquiring the spectrum curve, the user inputs a shooting request through voice and touching the light. The processor controls the exposure sequence of the fill light in the light supplement device according to the shooting request, and controls the camera to shoot the target object according to the exposure sequence , So as to obtain a group of images. The number of images in the group of images is related to the number of light-filling lamps in the light-filling device. Normally, the number of images is one more than the number of light-filling lamps. For example, if the number of fill light lamps in the fill light device is 4, the group of images includes 5 images, and the 5 images include the images corresponding to each fill light in the 4 fill light lamps, and one fill light The light is off and the image is under ambient light. For another example, if the number of fill light lamps in the fill light device is 3, the group of images includes 4 images, and the 4 images include the images corresponding to each of the 3 fill light lamps, and one fill light lamp. The light is off and the image is under ambient light.

图2是本申请实施例所适用的另一种电子设备的示意图。请参照图2,本实施例中,补光装置外置于电子设备,补光装置与电子设备通过通用串行总线(universal serial bus,USB)连接。本实施例中,当电子设备接收到用户输入的拍摄请求后,根据拍摄请求确定出曝光顺序后,需要通过USB等向补光装置发送指令,使得补光装置根据曝光顺序曝光;同时,电子设备根据曝光顺序,对对目标对象进行拍摄,从而得到一组图像。Fig. 2 is a schematic diagram of another electronic device to which an embodiment of the present application is applicable. Please refer to FIG. 2, in this embodiment, the light supplement device is externally placed on the electronic device, and the light supplement device and the electronic device are connected via a universal serial bus (USB). In this embodiment, after the electronic device receives the shooting request input by the user and determines the exposure sequence according to the shooting request, it needs to send instructions to the light supplement device via USB, etc., so that the light supplement device exposes according to the exposure sequence; at the same time, the electronic device According to the exposure sequence, the target object is photographed to obtain a set of images.

下面,在上述图1和图2的基础上,对本申请实施例所述的光谱曲线获取方法进行详细说明。示例性的,可参见图3。Hereinafter, on the basis of the above-mentioned FIG. 1 and FIG. 2, the method for obtaining the spectral curve according to the embodiment of the present application will be described in detail. For example, see Figure 3.

图3是本申请实施例提供的一种光谱曲线获取方法的流程图。本实施例是从电子设备的角度进行说明的,本实施例包括:Fig. 3 is a flowchart of a method for obtaining a spectral curve provided by an embodiment of the present application. This embodiment is described from the perspective of an electronic device, and this embodiment includes:

101、电子设备接收用户输入的拍摄请求。101. The electronic device receives a shooting request input by a user.

其中,所述拍摄请求用于请求拍摄一组图像,所述一组图像包含第一图像和第二图像,所述第一图像的光源为补光装置和环境光,所述第二图像的光源为所述环境光,所述补光装置包含至少一个补光灯,所述至少一个补光灯中不同的补光灯用于提供不同波长的光。Wherein, the shooting request is used to request to shoot a group of images, the group of images includes a first image and a second image, the light source of the first image is a light supplement device and ambient light, and the second image The light source of is the ambient light, the light supplement device includes at least one light supplement lamp, and different light supplement lamps in the at least one light supplement lamp are used to provide light of different wavelengths.

示例性的,用户可通过语音方式、触摸方式向输入拍摄请求。示例性的,可参见图4和图5。Exemplarily, the user can input a shooting request through voice or touch. For example, see Figure 4 and Figure 5.

图4是本申请实施例提供的光谱曲线获取方法中输入拍摄请求的一种示意图。请参照图4,本实施例中,电子设备上按照有“光谱曲线”应用程序(application,APP),该APP可以是电子设备的操作系统自带的APP,也可以是用户下载并安装到电子设备上的第三方的APP。需要获取光谱曲线时,用户点击桌面上的“光谱曲线”APP,从而开启该APP。然后,用户点击拍摄按钮开始拍摄。其中,拍摄按钮如图中椭圆所示。FIG. 4 is a schematic diagram of inputting a shooting request in the method for acquiring a spectral curve provided by an embodiment of the present application. Please refer to Figure 4, in this embodiment, there is a "spectral curve" application (APP) on the electronic device. The APP can be an APP that comes with the operating system of the electronic device, or it can be downloaded and installed by the user on the electronic device. The third-party APP on the device. When the spectrum curve needs to be obtained, the user clicks on the "spectral curve" APP on the desktop to open the APP. Then, the user clicks the shooting button to start shooting. Among them, the shooting button is shown as an oval in the figure.

图5是本申请实施例提供的光谱曲线获取方法中输入拍摄请求的另一种示意图。请参照图5,本实施例中,电子设备的照相机具备光谱曲线获取模式。需要获取光谱曲线时,用户点击桌面上的照相机,开启相机。然后,用户选中光谱曲线模式,将相机切换至光谱曲线模式下。最后,用户点击拍摄按钮开始拍摄。其中,拍摄按钮如图中椭圆所示。FIG. 5 is another schematic diagram of inputting a shooting request in the method for acquiring a spectral curve provided by an embodiment of the present application. Referring to FIG. 5, in this embodiment, the camera of the electronic device has a spectral curve acquisition mode. To obtain the spectral curve, the user clicks on the camera on the desktop to turn on the camera. Then, the user selects the spectral curve mode and switches the camera to the spectral curve mode. Finally, the user clicks the shooting button to start shooting. Among them, the shooting button is shown as an ellipse in the figure.

102、电子设备根据所述拍摄请求,控制所述补光装置中各补光灯的曝光顺序。102. The electronic device controls the exposure sequence of each fill light in the fill light device according to the shooting request.

示例性的,电子设备上预先存储补光装置中各补光灯的顺序。例如,补光装置包含4个补光灯,分别为补光灯1、补光灯2、补光灯3和补光灯4,该4个补光灯提供的波长分别对应的区间范围为620纳米(nm)~760nm、592nm~620nm、578nm~592nm、500nm~578nm,曝光顺序为补光灯1曝光、补光灯2曝光、补光灯3曝光、补光灯4曝光、补光灯1~补光灯4均不曝光。Exemplarily, the order of the light supplement lamps in the light supplement device is pre-stored on the electronic device. For example, the fill light device includes 4 fill lights, namely fill light 1, fill light 2, fill light 3, and fill light 4. The wavelengths provided by the 4 fill lights correspond to the interval range of 620. Nanometer (nm) ~ 760nm, 592nm ~ 620nm, 578nm ~ 592nm, 500nm ~ 578nm, the exposure sequence is fill light 1 exposure, fill light 2 exposure, fill light 3 exposure, fill light 4 exposure, fill light 1 ~Fill light 4 is not exposed.

本申请实施例中,补光装置的各补光灯提供的光的波长范围,也称之为不同窄带光谱。In the embodiments of the present application, the wavelength ranges of the light provided by the respective light supplement lamps of the light supplement device are also called different narrowband spectra.

103、电子设备根据所述曝光顺序,对目标对象进行拍摄,得到所述第一图像和所述第二图像。103. The electronic device photographs the target object according to the exposure sequence to obtain the first image and the second image.

示例性的,电子设备根据补光装置中补光灯的曝光顺序,对目标对象进行拍摄,从而得到第一图像和第二图像。其中,第一图像的光源为补光装置和环境光,第二图像的光源为环境光。继续沿用步骤102中的例子,补光装置包含4个补光灯,则电子设备根据曝光顺序,得到5幅图像,该5幅图像包括:补光灯1曝光和环境光提供光照的图像、补光灯2曝光和环境光提供光照的图像、补光灯3曝光和环境光提供光照的图像、补光灯4曝光和环境光提供光照的图像、补光灯1~4全部不曝光而是环境光提供光照的图像。其中,前4幅图像可以称之为第一图像,最后一幅全部补光灯均不曝光的图像称之为第二图像。Exemplarily, the electronic device photographs the target object according to the exposure sequence of the fill light in the fill light device to obtain the first image and the second image. Wherein, the light source of the first image is a light supplement device and ambient light, and the light source of the second image is ambient light. Continuing to use the example in step 102, the light supplement device contains 4 light supplement lamps, and the electronic device obtains 5 images according to the exposure sequence. The 5 images include: the light supplement light 1 exposure and the image provided by the ambient light, the supplement light Light 2 exposure and ambient light provide illuminated images, fill light 3 exposure and ambient light provide illuminated images, fill light 4 exposure and ambient light provide illuminated images, fill light 1 to 4 are all not exposed but environment Light provides illuminated images. Among them, the first 4 images can be called the first image, and the last image in which all the fill lights are not exposed is called the second image.

拍摄过程中,各补光灯的曝光速度与电子设备的拍摄帧率相关。During the shooting process, the exposure speed of each fill light is related to the shooting frame rate of the electronic device.

104、电子设备根据所述第一图像和所述第二图像,确定所述目标对象的光谱曲线。104. The electronic device determines the spectral curve of the target object according to the first image and the second image.

示例性的,电子设备对从各第一图像中剔除第二图像,得到仅由补光灯提供光照 的图像,之后,电子设备根据该些仅由补光灯提供光照的图像得到目标对象的光谱曲线。Exemplarily, the electronic device removes the second image from each first image to obtain an image illuminated only by the fill light, and then the electronic device obtains the spectrum of the target object based on the images only illuminated by the fill light curve.

本申请实施例提供的光谱曲线获取方法,电子设备接收到用户输入的请求拍摄一组图像的拍摄请求或,根据该拍摄请求,控制补光装置中各补光灯的曝光顺序,根据曝光顺序得到一组图像,该组图像包括由不同补光灯和环境光同时提供光照的图像和仅由环境光提供光照的图像。之后,电子设备根据该些图像得到目标对象的光谱曲线。该过程中,由补光灯提供不同波长的光,得到目标对象不同波段的图像,进而获得目标对象的光谱曲线,无需专用的光谱仪,成本低廉。而且,可以提供给普通用户在日常生活中使用。另外,该光谱曲线的获取过程不改变电子设备正常拍照的架构。According to the method for obtaining the spectral curve provided by the embodiment of the present application, the electronic device receives a user input requesting a shooting request for shooting a group of images or, according to the shooting request, controls the exposure sequence of each fill light in the fill light device according to the exposure sequence A set of images is obtained, and the set of images includes images that are illuminated by different fill lights and ambient light at the same time and images that are illuminated by only ambient light. Then, the electronic device obtains the spectral curve of the target object according to the images. In this process, different wavelengths of light are provided by the fill light to obtain images of different wavelength bands of the target object, and then the spectral curve of the target object is obtained, without the need for a dedicated spectrometer, and the cost is low. Moreover, it can be provided to ordinary users to use in their daily lives. In addition, the process of acquiring the spectral curve does not change the normal photographing architecture of the electronic device.

下面,对上述实施例中电子设备如何根据第一图像和第二图像,确定目标对象的光谱曲线进行详细说明。Hereinafter, how the electronic device in the foregoing embodiment determines the spectral curve of the target object based on the first image and the second image will be described in detail.

一种可行的设计中,电子设备根据所述第一图像和所述第二图像,确定所述目标对象的光谱曲线时,从第一图像中去除第二图像,得到光源为补光装置的第三图像,之后,电子设备根据第三图像,确定目标对象的光谱曲线。In a feasible design, when the electronic device determines the spectral curve of the target object based on the first image and the second image, it removes the second image from the first image to obtain the second image with the light source as the supplementary light device. After three images, the electronic device determines the spectral curve of the target object according to the third image.

示例性的,补光装置包含4个补光灯,分别为补光灯1、补光灯2、补光灯3和补光灯4,该4个补光灯提供的波长分别对应的区间范围为620纳米(nm)~760nm、592nm~620nm、578nm~592nm、500nm~578nm,则电子设备得到4幅第一图像和1幅第二图像,该4幅第一图像的光源分别为补光灯1+环境光、补光灯2+环境光、补光灯3+环境光、补光灯4+环境光,第二图像的光源为环境光。因此,电子设备利用高动态图像范围(high-dynamic range,HDR)等技术从4幅第一图像中除去第二图像,得到光源分别为补光灯1、补光灯2、补光灯3和补光灯4的4幅第三图像。然后,电子设备根据该些第三图像确定目标对象的光谱曲线。Exemplarily, the fill light device includes 4 fill lights, namely fill light 1, fill light 2, fill light 3, and fill light 4. The wavelengths provided by the 4 fill lights correspond to the interval ranges respectively. 620 nanometers (nm) ~ 760nm, 592nm ~ 620nm, 578nm ~ 592nm, 500nm ~ 578nm, the electronic device obtains 4 first images and 1 second image, the light sources of the 4 first images are fill light 1+ambient light, fill light 2+ambient light, fill light 3+ambient light, fill light 4+ambient light, the light source of the second image is ambient light. Therefore, the electronic device uses technologies such as high-dynamic range (HDR) to remove the second image from the four first images, and the light sources are respectively fill light 1, fill light 2, fill light 3 and 4 third images of fill light 4. Then, the electronic device determines the spectral curve of the target object according to the third images.

本实施例中,电子设备通过从各第一图像中除去第二图像,得到第三图像,并利用各第三图像确定目标对象的光谱曲线,实现获取目标对象的光谱曲线的目的。In this embodiment, the electronic device obtains a third image by removing the second image from each first image, and uses each third image to determine the spectral curve of the target object to achieve the purpose of obtaining the spectral curve of the target object.

下面,对电子设备如何根据第三图像,确定目标对象的光谱曲线进行详细说明。Hereinafter, how the electronic device determines the spectral curve of the target object based on the third image will be described in detail.

一种可行的设计中,电子设备对所述至少一个补光灯中各补光灯对应的第三图像进行插值处理,得到所述目标对象的光谱曲线。In a feasible design, the electronic device performs interpolation processing on the third image corresponding to each of the at least one fill light to obtain the spectral curve of the target object.

示例性的,电子设备结合该电子设备摄像头的图像传感器(sensor)的光谱响应函数等,对各第三图像进行插值处理,得到目标对象的光谱曲线。Exemplarily, the electronic device combines the spectral response function of an image sensor (sensor) of the camera of the electronic device to perform interpolation processing on each third image to obtain the spectral curve of the target object.

本实施例中,通过插值算法得到目标对象的光谱曲线,实现获取目标对象的光谱曲线的目的。In this embodiment, the spectral curve of the target object is obtained through an interpolation algorithm, so as to achieve the purpose of obtaining the spectral curve of the target object.

一种可行的设计中,上述的曝光顺序中相邻两个补光灯的波长的差值为预设差值。示例性的,可参见图6,图6是本申请实施例提供的光谱曲线获取方法中补光灯的波长示意图。请参照图6,补光装置包括4个补光灯,分别为补光灯1、补光灯2、补光灯3和补光灯4,曝光顺序为补光灯1、补光灯2、补光灯3和补光灯4,每个补光灯的光可以分解出红(red)、绿(green)、蓝(blue)三种颜色的光。其中,蓝光如图中实线所示,绿光如图中点划线所示,红光如图中虚线所示。为了使得补光装置能提供的波长分布在整个频谱区间,则各补光灯的波长的差值为X,即各补光灯以X的步长分布在整个频谱区间,从而使得补光装置的补光可以获得整个光谱范围内的窄带光谱的图像。其中,补光装置的整个 频谱区间例如为可见光频谱、紫外线频谱等。In a feasible design, the difference between the wavelengths of two adjacent fill lamps in the above exposure sequence is a preset difference. Exemplarily, refer to FIG. 6, which is a schematic diagram of the wavelength of the fill light in the method for obtaining a spectrum curve provided by an embodiment of the present application. Please refer to Fig. 6, the light supplement device includes 4 light supplement lamps, namely supplement light 1, supplement light 2, supplement light 3 and supplement light 4. The exposure sequence is supplement light 1, supplement light 2, For the fill light 3 and the fill light 4, the light of each fill light can be decomposed into three colors of red (red), green (green), and blue (blue). Among them, the blue light is shown by the solid line in the figure, the green light is shown by the dotted line in the figure, and the red light is shown by the dotted line in the figure. In order to distribute the wavelengths provided by the supplementary light device in the entire frequency spectrum, the difference between the wavelengths of the supplementary lights is X, that is, each supplementary light is distributed in the entire spectrum interval in steps of X, so that the Fill light can obtain narrow-band spectral images in the entire spectral range. Among them, the entire spectrum interval of the supplemental light device is, for example, the visible light spectrum and the ultraviolet spectrum.

本实施例中,由于曝光顺序中相邻两个补光灯的波长的差值为预设阈值,使得补光装置能提供的波长分布在整个频谱区间。In this embodiment, since the wavelength difference between two adjacent fill light lamps in the exposure sequence is a preset threshold, the wavelengths provided by the fill light device are distributed in the entire frequency spectrum.

一种可行的设计中,上述的补光装置的补光频段可见光频段,则第一图像和第二图像为RGB图像;或者,上述的补光装置的补光频段为红外线频段,则第一图像和第二图像为红绿蓝红外(red green blue infrared radiation,RGB-IR)图像。In a feasible design, the first image and the second image are RGB images in the visible light frequency band of the supplementary light frequency band of the above-mentioned supplementary light device; or, the supplementary light frequency band of the above-mentioned supplementary light device is the infrared frequency band, then the first image And the second image is a red green blue infrared (RGB-IR) image.

示例性的,当电子设备的摄像头用于拍摄RGB图像时,补光装置的补光频率为可见光频段,当电子设备的摄像头用于拍摄红外线图像时,补光装置的补光频率为红外线频段。电子设备的摄像头能够拍摄哪种图像,和摄像头的传感器的像素有关。Exemplarily, when the camera of the electronic device is used to capture RGB images, the supplement light frequency of the light supplement device is in the visible light frequency band, and when the camera of the electronic device is used to capture infrared images, the supplement light frequency of the light supplement device is the infrared frequency band. What kind of images the camera of an electronic device can capture depends on the pixels of the camera's sensor.

本实施例中,补光装置的补光频段可以为可见光频段或红外线频段,实现灵活根据需求获取光谱图像的目的。In this embodiment, the supplemental light frequency band of the supplemental light device may be a visible light frequency band or an infrared frequency band, so as to achieve the purpose of flexibly acquiring spectral images according to requirements.

图7是本申请实施例提供的一种电子设备的结构示意图,请参照图7,本申请实施例提供的电子设备100包括:处理器11、存储器12,以及存储在所述存储器12上并可在所述处理器11上运行的计算机程序,所述处理器11执行所述程序时执行如下步骤:FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Please refer to FIG. 7. The electronic device 100 provided by an embodiment of the present application includes a processor 11, a memory 12, and is stored on the memory 12 and can A computer program running on the processor 11, when the processor 11 executes the program, the following steps are executed:

接收用户输入的拍摄请求,所述拍摄请求用于请求拍摄一组图像,所述一组图像包含第一图像和第二图像,所述第一图像的光源为补光装置和环境光,所述第二图像的光源为所述环境光,所述补光装置包含至少一个补光灯,所述至少一个补光灯中不同的补光灯用于提供不同波长的光;Receiving a photographing request input by a user, the photographing request is used to request to photograph a group of images, the group of images includes a first image and a second image, and the light source of the first image is a supplementary light device and ambient light, The light source of the second image is the ambient light, the light supplement device includes at least one light supplement lamp, and different light supplement lamps in the at least one light supplement lamp are used to provide light of different wavelengths;

根据所述拍摄请求,控制所述补光装置中各补光灯的曝光顺序;According to the shooting request, controlling the exposure sequence of the light supplement lamps in the light supplement device;

根据所述曝光顺序,对目标对象进行拍摄,得到所述第一图像和所述第二图像;Photographing the target object according to the exposure sequence to obtain the first image and the second image;

根据所述第一图像和所述第二图像,确定所述目标对象的光谱曲线。According to the first image and the second image, the spectral curve of the target object is determined.

一种可行的设计中,所述根据所述第一图像和所述第二图像,确定所述目标对象的光谱曲线,包括:In a feasible design, the determining the spectral curve of the target object according to the first image and the second image includes:

从所述第一图像中去除所述第二图像,得到光源为所述补光装置的第三图像;Removing the second image from the first image to obtain a third image whose light source is the light supplement device;

根据所述第三图像,确定所述目标对象的光谱曲线。According to the third image, the spectral curve of the target object is determined.

一种可行的设计中,所述根据所述第三图像,确定所述目标对象的光谱曲线,包括:In a feasible design, the determining the spectral curve of the target object according to the third image includes:

对所述至少一个补光灯中各补光灯对应的第三图像进行插值处理,得到所述目标对象的光谱曲线。Perform interpolation processing on the third image corresponding to each of the at least one fill light to obtain the spectral curve of the target object.

一种可行的设计中,所述曝光顺序中相邻两个补光灯的波长的差值为预设差值。In a feasible design, the difference between the wavelengths of two adjacent fill lights in the exposure sequence is a preset difference.

一种可行的设计中,所述补光装置的补光频段可见光频段,所述第一图像和所述第二图像为红绿蓝RGB图像;In a feasible design, the compensation light frequency band of the light compensation device is a visible light frequency band, and the first image and the second image are red, green, and blue RGB images;

或者,or,

所述补光装置的补光频段为红外线频段,所述第一图像和所述第二图像为红绿蓝红外RGB-IR图像。The supplemental light frequency band of the supplementary light device is an infrared frequency band, and the first image and the second image are red, green, and blue infrared RGB-IR images.

一种可行的设计中,所述补光装置为内置于电子设备;或者,所述补光装置外置于电子设备。In a feasible design, the light supplement device is built in the electronic equipment; or, the light supplement device is externally built in the electronic equipment.

本申请实施例提供的电子设备,可以执行上述方法实施例中电子设备的动作,其实现原理和技术效果类似,在此不再赘述。The electronic device provided in the embodiment of the present application can perform the actions of the electronic device in the foregoing method embodiment, and its implementation principles and technical effects are similar, and will not be repeated here.

图8是本申请实施例提供的一种芯片的结构示意图,请参照图8,本申请实施例提供 的芯片200包括:处理器21和接口22,所述接口22用于接收代码指令,并传输至所述处理器21,所述处理器21运行所述代码指令以执行以下步骤:FIG. 8 is a schematic structural diagram of a chip provided by an embodiment of the present application. Please refer to FIG. 8. The chip 200 provided by an embodiment of the present application includes a processor 21 and an interface 22. The interface 22 is used to receive code instructions and transmit To the processor 21, the processor 21 runs the code instructions to perform the following steps:

接收用户输入的拍摄请求,所述拍摄请求用于请求拍摄一组图像,所述一组图像包含第一图像和第二图像,所述第一图像的光源为补光装置和环境光,所述第二图像的光源为所述环境光,所述补光装置包含至少一个补光灯,所述至少一个补光灯中不同的补光灯用于提供不同波长的光;Receiving a photographing request input by a user, the photographing request is used to request to photograph a group of images, the group of images includes a first image and a second image, and the light source of the first image is a supplementary light device and ambient light, The light source of the second image is the ambient light, the light supplement device includes at least one light supplement lamp, and different light supplement lamps in the at least one light supplement lamp are used to provide light of different wavelengths;

根据所述拍摄请求,控制所述补光装置中各补光灯的曝光顺序;According to the shooting request, controlling the exposure sequence of the light supplement lamps in the light supplement device;

根据所述曝光顺序,对目标对象进行拍摄,得到所述第一图像和所述第二图像;Photographing the target object according to the exposure sequence to obtain the first image and the second image;

根据所述第一图像和所述第二图像,确定所述目标对象的光谱曲线。According to the first image and the second image, the spectral curve of the target object is determined.

一种可行的设计中,所述根据所述第一图像和所述第二图像,确定所述目标对象的光谱曲线,包括:In a feasible design, the determining the spectral curve of the target object according to the first image and the second image includes:

从所述第一图像中去除所述第二图像,得到光源为所述补光装置的第三图像;Removing the second image from the first image to obtain a third image whose light source is the light supplement device;

根据所述第三图像,确定所述目标对象的光谱曲线。According to the third image, the spectral curve of the target object is determined.

一种可行的设计中,所述根据所述第三图像,确定所述目标对象的光谱曲线,包括:In a feasible design, the determining the spectral curve of the target object according to the third image includes:

对所述至少一个补光灯中各补光灯对应的第三图像进行插值处理,得到所述目标对象的光谱曲线。Perform interpolation processing on the third image corresponding to each of the at least one fill light to obtain the spectral curve of the target object.

一种可行的设计中,所述曝光顺序中相邻两个补光灯的波长的差值为预设差值。In a feasible design, the difference between the wavelengths of two adjacent fill lights in the exposure sequence is a preset difference.

一种可行的设计中,所述补光装置的补光频段可见光频段,所述第一图像和所述第二图像为红绿蓝RGB图像;In a feasible design, the compensation light frequency band of the light compensation device is a visible light frequency band, and the first image and the second image are red, green, and blue RGB images;

或者,or,

所述补光装置的补光频段为红外线频段,所述第一图像和所述第二图像为红绿蓝红外RGB-IR图像。The supplemental light frequency band of the supplementary light device is an infrared frequency band, and the first image and the second image are red, green, and blue infrared RGB-IR images.

一种可行的设计中,所述补光装置为内置于电子设备;或者,所述补光装置外置于电子设备。In a feasible design, the light supplement device is built in the electronic equipment; or, the light supplement device is externally built in the electronic equipment.

本申请实施例提供的芯片,其运行代码指令时可以执行上述方法实施例中电子设备的动作,其实现原理和技术效果类似,在此不再赘述。The chip provided in the embodiment of the present application can execute the actions of the electronic device in the foregoing method embodiment when running code instructions, and its implementation principles and technical effects are similar, and will not be repeated here.

另外,本申请实施例在上述获取光谱曲线方法的基础上,还提供一种包含指令的计算机程序产品,当其在电子设备上运行时,使得电子设备执行上述任意实施例中电子设备的动作,其实现原理和技术效果类似,在此不再赘述。In addition, on the basis of the foregoing method for obtaining spectral curves, the embodiments of the present application also provide a computer program product containing instructions, which when run on an electronic device, causes the electronic device to perform the actions of the electronic device in any of the foregoing embodiments. Its implementation principle and technical effect are similar, so it will not be repeated here.

本申请实施例在上述获取光谱曲线方法的基础上,还提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在电子设备上运行时,使得电子设备执行上述任意实施例中电子设备的动作,其实现原理和技术效果类似,在此不再赘述。On the basis of the above-mentioned method for obtaining spectral curves, the embodiments of the present application also provide a computer-readable storage medium having instructions stored in the computer-readable storage medium, which when running on an electronic device, cause the electronic device to execute any of the above The actions of the electronic device in the embodiment are similar in implementation principles and technical effects, and will not be repeated here.

本申请实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide the electronic device into functional modules according to the foregoing method examples. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.

本文中的术语“多个”是指两个或两个以上。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A, 同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系;在公式中,字符“/”,表示前后关联对象是一种“相除”的关系。The term "plurality" herein refers to two or more. The term "and/or" in this article is only an association relationship describing associated objects, which means that there can be three types of relationships, for example, A and/or B can mean: A alone exists, A and B exist at the same time, exist alone B these three situations. In addition, the character "/" in this article generally indicates that the associated objects before and after are in an "or" relationship; in the formula, the character "/" indicates that the associated objects before and after are in a "division" relationship.

可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。It can be understood that the various numerical numbers involved in the embodiments of the present application are only for easy distinction for description, and are not used to limit the scope of the embodiments of the present application.

可以理解的是,在本申请的实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施例的实施过程构成任何限定。It can be understood that, in the embodiments of the present application, the size of the sequence numbers of the foregoing processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not be implemented in this application. The implementation process of the example constitutes any limitation.

可以理解的是,在本申请的实施例中,存储器可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本申请实施例中的存储器还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。It is understandable that, in the embodiment of the present application, the memory may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or a volatile memory. (volatile memory), such as random-access memory (random-access memory, RAM). The memory is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory in the embodiments of the present application may also be a circuit or any other device capable of realizing a storage function, for storing program instructions and/or data.

通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated as needed. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be It can be combined or integrated into another device, or some features can be omitted or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。The units described as separate parts may or may not be physically separate. The parts displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed to multiple different places. . Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments. In addition, the functional units in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.

本申请实施例提供的方法中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、第二网络节点、终端或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机可以存取的任何可用介质或者是包含一个或多个可 用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DVD))、或者半导体介质(例如,SSD)等。The methods provided in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, it can be implemented in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a dedicated computer, a computer network, a second network node, a terminal, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center. Transmission to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital video disc (digital video disc, DVD)), or a semiconductor medium (for example, SSD).

以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any change or replacement within the technical scope disclosed in this application shall be covered by the protection scope of this application . Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (18)

一种光谱曲线获取方法,其特征在于,包括:A method for obtaining a spectrum curve, characterized in that it comprises: 电子设备接收用户输入的拍摄请求,所述拍摄请求用于请求拍摄一组图像,所述一组图像包含第一图像和第二图像,所述第一图像的光源为补光装置和环境光,所述第二图像的光源为所述环境光,所述补光装置包含至少一个补光灯,所述至少一个补光灯中不同的补光灯用于提供不同波长的光;The electronic device receives a shooting request input by the user, the shooting request is used to request to shoot a group of images, the group of images includes a first image and a second image, and the light source of the first image is a light supplement device and an environment Light, the light source of the second image is the ambient light, the light supplement device includes at least one light supplement lamp, and different light supplement lamps in the at least one light supplement lamp are used to provide light of different wavelengths; 所述电子设备根据所述拍摄请求,控制所述补光装置中各补光灯的曝光顺序;The electronic device controls the exposure sequence of the light fill lamps in the light fill device according to the shooting request; 所述电子设备根据所述曝光顺序,对目标对象进行拍摄,得到所述第一图像和所述第二图像;The electronic device photographs the target object according to the exposure sequence to obtain the first image and the second image; 所述电子设备根据所述第一图像和所述第二图像,确定所述目标对象的光谱曲线。The electronic device determines the spectral curve of the target object according to the first image and the second image. 根据权利要求1所述的方法,其特征在于,所述电子设备根据所述第一图像和所述第二图像,确定所述目标对象的光谱曲线,包括:The method according to claim 1, wherein the electronic device determining the spectral curve of the target object according to the first image and the second image comprises: 所述电子设备从所述第一图像中去除所述第二图像,得到光源为所述补光装置的第三图像;Removing the second image from the first image by the electronic device to obtain a third image whose light source is the light supplement device; 所述电子设备根据所述第三图像,确定所述目标对象的光谱曲线。The electronic device determines the spectral curve of the target object according to the third image. 根据权利要求2所述的方法,其特征在于,所述电子设备根据所述第三图像,确定所述目标对象的光谱曲线,包括:The method according to claim 2, wherein the electronic device determining the spectral curve of the target object according to the third image comprises: 所述电子设备对所述至少一个补光灯中各补光灯对应的第三图像进行插值处理,得到所述目标对象的光谱曲线。The electronic device performs interpolation processing on the third image corresponding to each of the at least one fill light to obtain the spectral curve of the target object. 根据权利要求1~3任一项所述的方法,其特征在于,所述曝光顺序中相邻两个补光灯的波长的差值为预设差值。The method according to any one of claims 1 to 3, wherein the difference between the wavelengths of two adjacent fill lights in the exposure sequence is a preset difference. 根据权利要求1~4任一项所述的方法,其特征在于,The method according to any one of claims 1 to 4, wherein: 所述补光装置的补光频段可见光频段,所述第一图像和所述第二图像为红绿蓝RGB图像;The complementary light frequency band of the light supplement device is a visible light frequency band, and the first image and the second image are red, green, and blue RGB images; 或者,or, 所述补光装置的补光频段为红外线频段,所述第一图像和所述第二图像为红绿蓝红外RGB-IR图像。The supplemental light frequency band of the supplementary light device is an infrared frequency band, and the first image and the second image are red, green, and blue infrared RGB-IR images. 根据权利要求1~5任一项所述的方法,其特征在于,所述补光装置为内置于所述电子设备;或者,所述补光装置外置于所述电子设备。The method according to any one of claims 1 to 5, wherein the light supplement device is built in the electronic device; or the light supplement device is externally installed in the electronic device. 一种电子设备,其特征在于,包括:处理器、存储器,以及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时执行如下步骤:An electronic device, comprising: a processor, a memory, and a computer program stored on the memory and running on the processor, wherein the processor executes the program when the program is executed The following steps: 接收用户输入的拍摄请求,所述拍摄请求用于请求拍摄一组图像,所述一组图像包含第一图像和第二图像,所述第一图像的光源为补光装置和环境光,所述第二图像的光源为所述环境光,所述补光装置包含至少一个补光灯,所述至少一个补光灯中不同的补光灯用于提供不同波长的光;Receiving a photographing request input by a user, the photographing request is used to request to photograph a group of images, the group of images includes a first image and a second image, and the light source of the first image is a supplementary light device and ambient light, The light source of the second image is the ambient light, the light supplement device includes at least one light supplement lamp, and different light supplement lamps in the at least one light supplement lamp are used to provide light of different wavelengths; 根据所述拍摄请求,控制所述补光装置中各补光灯的曝光顺序;According to the shooting request, controlling the exposure sequence of the light supplement lamps in the light supplement device; 根据所述曝光顺序,对目标对象进行拍摄,得到所述第一图像和所述第二图像;Photographing the target object according to the exposure sequence to obtain the first image and the second image; 根据所述第一图像和所述第二图像,确定所述目标对象的光谱曲线。According to the first image and the second image, the spectral curve of the target object is determined. 根据权利要求7所述的设备,其特征在于,所述根据所述第一图像和所述第二图像,确定所述目标对象的光谱曲线,包括:The device according to claim 7, wherein the determining the spectral curve of the target object according to the first image and the second image comprises: 从所述第一图像中去除所述第二图像,得到光源为所述补光装置的第三图像;Removing the second image from the first image to obtain a third image whose light source is the light supplement device; 根据所述第三图像,确定所述目标对象的光谱曲线。According to the third image, the spectral curve of the target object is determined. 根据权利要求8所述的设备,其特征在于,所述根据所述第三图像,确定所述目标对象的光谱曲线,包括:The device according to claim 8, wherein the determining the spectral curve of the target object according to the third image comprises: 对所述至少一个补光灯中各补光灯对应的第三图像进行插值处理,得到所述目标对象的光谱曲线。Perform interpolation processing on the third image corresponding to each of the at least one fill light to obtain the spectral curve of the target object. 根据权利要求7~9任一项所述的设备,其特征在于,所述曝光顺序中相邻两个补光灯的波长的差值为预设差值。The device according to any one of claims 7-9, wherein the difference in wavelength between two adjacent fill lights in the exposure sequence is a preset difference. 根据权利要求7~10任一项所述的设备,其特征在于,The device according to any one of claims 7 to 10, characterized in that: 所述补光装置的补光频段可见光频段,所述第一图像和所述第二图像为红绿蓝RGB图像;The complementary light frequency band of the light supplement device is a visible light frequency band, and the first image and the second image are red, green, and blue RGB images; 或者,or, 所述补光装置的补光频段为红外线频段,所述第一图像和所述第二图像为红绿蓝红外RGB-IR图像。The supplemental light frequency band of the supplementary light device is an infrared frequency band, and the first image and the second image are red, green, and blue infrared RGB-IR images. 根据权利要求7~11任一项所述的设备,其特征在于,所述补光装置为内置于电子设备;或者,所述补光装置外置于电子设备。The device according to any one of claims 7 to 11, wherein the light supplement device is built in an electronic device; or, the light supplement device is externally built in the electronic device. 一种芯片,其特征在于,所述芯片包括处理器和接口,所述接口用于接收代码指令,并传输至所述处理器,所述处理器运行所述代码指令以执行以下步骤:A chip, characterized in that the chip includes a processor and an interface, the interface is used to receive code instructions and transmit them to the processor, and the processor runs the code instructions to perform the following steps: 接收用户输入的拍摄请求,所述拍摄请求用于请求拍摄一组图像,所述一组图像包含第一图像和第二图像,所述第一图像的光源为补光装置和环境光,所述第二图像的光源为所述环境光,所述补光装置包含至少一个补光灯,所述至少一个补光灯中不同的补光灯用于提供不同波长的光;Receiving a photographing request input by a user, the photographing request is used to request to photograph a group of images, the group of images includes a first image and a second image, and the light source of the first image is a supplementary light device and ambient light, The light source of the second image is the ambient light, the light supplement device includes at least one light supplement lamp, and different light supplement lamps in the at least one light supplement lamp are used to provide light of different wavelengths; 根据所述拍摄请求,控制所述补光装置中各补光灯的曝光顺序;According to the shooting request, controlling the exposure sequence of the light supplement lamps in the light supplement device; 根据所述曝光顺序,对目标对象进行拍摄,得到所述第一图像和所述第二图像;Photographing the target object according to the exposure sequence to obtain the first image and the second image; 根据所述第一图像和所述第二图像,确定所述目标对象的光谱曲线。According to the first image and the second image, the spectral curve of the target object is determined. 根据权利要求13所述的芯片,其特征在于,所述根据所述第一图像和所述第二图像,确定所述目标对象的光谱曲线,包括:The chip according to claim 13, wherein the determining the spectral curve of the target object according to the first image and the second image comprises: 从所述第一图像中去除所述第二图像,得到光源为所述补光装置的第三图像;Removing the second image from the first image to obtain a third image whose light source is the light supplement device; 根据所述第三图像,确定所述目标对象的光谱曲线。According to the third image, the spectral curve of the target object is determined. 根据权利要求14所述的芯片,其特征在于,所述根据所述第三图像,确定所述目标对象的光谱曲线,包括:The chip according to claim 14, wherein the determining the spectral curve of the target object according to the third image comprises: 对所述至少一个补光灯中各补光灯对应的第三图像进行插值处理,得到所述目标对象的光谱曲线。Perform interpolation processing on the third image corresponding to each of the at least one fill light to obtain the spectral curve of the target object. 根据权利要求13~15任一项所述的芯片,其特征在于,所述曝光顺序中相邻两个补光灯的波长的差值为预设差值。The chip according to any one of claims 13 to 15, wherein the difference between the wavelengths of two adjacent fill lamps in the exposure sequence is a preset difference. 根据权利要求13~16任一项所述的芯片,其特征在于,The chip according to any one of claims 13-16, wherein: 所述补光装置的补光频段可见光频段,所述第一图像和所述第二图像为红绿蓝RGB 图像;The supplementary light frequency band of the supplementary light device is a visible light frequency band, and the first image and the second image are red, green, and blue RGB images; 或者,or, 所述补光装置的补光频段为红外线频段,所述第一图像和所述第二图像为红绿蓝红外RGB-IR图像。The supplemental light frequency band of the supplementary light device is an infrared frequency band, and the first image and the second image are red, green, and blue infrared RGB-IR images. 根据权利要求13~17任一项所述的芯片,其特征在于,所述补光装置为内置于电子设备;或者,所述补光装置外置于电子设备。The chip according to any one of claims 13 to 17, wherein the light supplement device is built in an electronic device; or the light supplement device is externally built in the electronic device.
PCT/CN2020/094570 2019-06-06 2020-06-05 Spectral curve acquiring method, electronic device, and chip Ceased WO2020244619A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910493020.X 2019-06-06
CN201910493020.XA CN110336952B (en) 2019-06-06 2019-06-06 Spectral curve acquisition method, electronic device and chip

Publications (1)

Publication Number Publication Date
WO2020244619A1 true WO2020244619A1 (en) 2020-12-10

Family

ID=68140810

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/094570 Ceased WO2020244619A1 (en) 2019-06-06 2020-06-05 Spectral curve acquiring method, electronic device, and chip

Country Status (2)

Country Link
CN (1) CN110336952B (en)
WO (1) WO2020244619A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115412677A (en) * 2021-05-27 2022-11-29 上海三思电子工程有限公司 Lamp spectrum determining and acquiring method, lamp, related equipment, system and medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110336952B (en) * 2019-06-06 2020-11-17 华为技术有限公司 Spectral curve acquisition method, electronic device and chip

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103983649A (en) * 2014-05-27 2014-08-13 中国工程物理研究院流体物理研究所 Foreign substance detection system based on spectral imaging and foreign substance detection method based on spectral imaging
US20160349228A1 (en) * 2015-05-29 2016-12-01 Rebellion Photonics, Inc. Hydrogen sulfide imaging system
CN107192456A (en) * 2017-06-22 2017-09-22 温州大学 A kind of color measuring multi-optical spectrum imaging system based on LED illumination
CN109142279A (en) * 2018-06-29 2019-01-04 努比亚技术有限公司 A kind of spectral method of detection, mobile terminal and computer readable storage medium
CN109269643A (en) * 2018-11-02 2019-01-25 天津津航技术物理研究所 Spectrum demodulating system and method based on mobile device screen light source
CN109444052A (en) * 2018-10-29 2019-03-08 合刃科技(武汉)有限公司 Hyperspectral imaging devices, imaging system and monitoring method
CN109829272A (en) * 2019-01-18 2019-05-31 Oppo广东移动通信有限公司 application control method and related device
CN110336952A (en) * 2019-06-06 2019-10-15 华为技术有限公司 Curve of spectrum acquisition methods, electronic equipment and chip

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6574501B2 (en) * 1998-07-13 2003-06-03 Childrens Hospital Los Angeles Assessing blood brain barrier dynamics or identifying or measuring selected substances or toxins in a subject by analyzing Raman spectrum signals of selected regions in the eye
JP2017505901A (en) * 2014-01-03 2017-02-23 ベリフード, リミテッドVerifood, Ltd. Spectroscopic system, method and application
CN104897374B (en) * 2015-06-16 2016-04-13 常州千明智能照明科技有限公司 A kind of color calibration method of camera module
CN108924390A (en) * 2018-06-27 2018-11-30 朗昭创新控股(深圳)有限公司 A kind of photographic device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103983649A (en) * 2014-05-27 2014-08-13 中国工程物理研究院流体物理研究所 Foreign substance detection system based on spectral imaging and foreign substance detection method based on spectral imaging
US20160349228A1 (en) * 2015-05-29 2016-12-01 Rebellion Photonics, Inc. Hydrogen sulfide imaging system
CN107192456A (en) * 2017-06-22 2017-09-22 温州大学 A kind of color measuring multi-optical spectrum imaging system based on LED illumination
CN109142279A (en) * 2018-06-29 2019-01-04 努比亚技术有限公司 A kind of spectral method of detection, mobile terminal and computer readable storage medium
CN109444052A (en) * 2018-10-29 2019-03-08 合刃科技(武汉)有限公司 Hyperspectral imaging devices, imaging system and monitoring method
CN109269643A (en) * 2018-11-02 2019-01-25 天津津航技术物理研究所 Spectrum demodulating system and method based on mobile device screen light source
CN109829272A (en) * 2019-01-18 2019-05-31 Oppo广东移动通信有限公司 application control method and related device
CN110336952A (en) * 2019-06-06 2019-10-15 华为技术有限公司 Curve of spectrum acquisition methods, electronic equipment and chip

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115412677A (en) * 2021-05-27 2022-11-29 上海三思电子工程有限公司 Lamp spectrum determining and acquiring method, lamp, related equipment, system and medium
CN115412677B (en) * 2021-05-27 2023-07-25 上海三思电子工程有限公司 Spectrum determination and acquisition methods of lamps and related equipment and media

Also Published As

Publication number Publication date
CN110336952B (en) 2020-11-17
CN110336952A (en) 2019-10-15

Similar Documents

Publication Publication Date Title
CN109547701B (en) Image capturing method, device, storage medium and electronic device
EP4024323A1 (en) Image processing method and apparatus
CN104754239B (en) Photographic method and device
CN112150399A (en) Image enhancement method based on wide dynamic range and electronic equipment
CN114531578B (en) Light source spectrum acquisition method and device
CN113766204B (en) Image source color adjustment method, electronic device and storage medium
WO2019011090A1 (en) White balance synchronization method and apparatus, and terminal device
CN111885304A (en) Photographing method, mobile terminal and computer storage medium
CN104683702B (en) A kind of method, apparatus of light filling when taking pictures and a kind of mobile terminal
CN111860530B (en) Electronic equipment, data processing method and related device
CN111866318A (en) Multispectral imaging method, multispectral imaging device, mobile terminal and storage medium
CN106060402A (en) Image data processing method and device, and mobile terminal
CN105979235A (en) Image processing method and terminal
CN106210517A (en) The processing method of a kind of view data, device and mobile terminal
WO2020244619A1 (en) Spectral curve acquiring method, electronic device, and chip
WO2023020527A1 (en) Image processing method and apparatus, electronic device, and readable storage medium
CN115802183B (en) Image processing methods and related equipment
CN114063947B (en) Screen display method, device, electronic equipment and computer storage medium
CN115550575A (en) Image processing method and related device
CN117692788B (en) Image processing method and electronic equipment
CN115706853A (en) Video processing method and device, electronic equipment and storage medium
CN118509718A (en) Image processing method, model training method and related equipment
CN107395987A (en) A kind of smart mobile phone frame rate control method and system for visible light communication
CN117711300B (en) Image display method, electronic device, readable storage medium and chip
US20240259698A1 (en) Post automatic exposure control (aec) and automatic white balance (awb) processing to improve video quality

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20818645

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20818645

Country of ref document: EP

Kind code of ref document: A1