Shadowless lighting method suitable for portable equipment and portable equipment

Through portable equipment, image acquisition and shadow area adjustment of reference objects within the target range is solved, and shadowless lighting is achieved without using professional shadowless lights, achieving efficient and convenient shadowless lighting effects.

CN119603827APending Publication Date: 2025-03-11SHENZHEN LACHESIS MOBILE MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411725219.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In some scenarios where high brightness and uniform lighting are required, it is difficult for the prior art to realize shadowless lighting without using professional shadowless lamps, and professional shadowless lamps have problems such as complex structure and inability to portability.

Method used

The portable device collects images of reference objects within the target range, extracts the shadow area, and adjusts the illumination direction of multiple light sources according to the shadow area to build a shadowless lighting environment.

Benefits of technology

It realizes the rapid and simple construction of shadowless lighting environment without the use of professional shadowless lights, reduces equipment costs, and improves the convenience and flexibility of shadowless lighting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603827A_ABST
    Figure CN119603827A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of illumination control, and discloses a shadowless illumination method suitable for portable equipment and the portable equipment, and the portable equipment comprises a plurality of light sources with adjustable illumination directions; the method comprises the following steps: respectively carrying out image acquisition on a reference object in a target range at a plurality of shooting angles to obtain a reference image; performing shadow extraction on the reference image to obtain a reference shadow area in the reference image; adjusting the irradiation directions of the plurality of light sources according to the reference shadow area in each reference image, and determining the adjusted shadow area; if the adjusted shadow area meets the preset light source adjustment condition, determining a target light source configuration scheme according to the adjusted irradiation directions of the plurality of light sources; wherein the target light source configuration scheme is suitable for the portable device to construct a shadowless lighting environment within a target range. The light source of the portable equipment is adjusted according to the shadow area in the target range, so that a shadowless lighting environment is constructed under the condition that a professional shadowless lamp cannot be utilized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of lighting control technology, and in particular to a shadowless lighting method suitable for portable devices and a portable device. Background Art

[0002] In some scenes that require high brightness and uniform lighting, such as operating rooms and live broadcast rooms, conventional lighting methods cannot meet the requirements of shadowless lighting. Therefore, professional shadowless lamps are usually used for lighting to eliminate shadows in the scene and create a shadowless lighting environment. In actual situations, professional shadowless lamps have complex structures and are not portable. In addition, installing shadowless lamps in the above scenes will bring high cost requirements, resulting in the inability to use shadowless lamps for lighting in some cases. Therefore, it is urgent to provide a method that can achieve shadowless lighting when shadowless lamps cannot be used. Summary of the invention

[0003] The present application provides a shadowless lighting method and portable device suitable for portable devices, which adjust the light source of the portable device itself according to the shadow area within the target range, thereby achieving the technical effect of constructing a shadowless lighting environment within the target range when a professional shadowless lamp cannot be used.

[0004] In order to achieve the above objectives, the main technical solutions adopted in this application include:

[0005] In a first aspect, an embodiment of the present application provides a shadowless lighting method suitable for a portable device, wherein the portable device includes a plurality of light sources with adjustable illumination directions; the method includes:

[0006] Capturing images of reference objects within the target range at multiple shooting angles to obtain reference images corresponding to the shooting angles; wherein the reference objects are objects that can block light and form shadows;

[0007] Performing shadow extraction on the reference image to obtain a reference shadow area in the reference image;

[0008] Adjusting the illumination directions of the multiple light sources according to the reference shadow area in each of the reference images, and determining an adjusted shadow area; wherein the adjusted shadow area is a shadow area in an adjusted image, and the adjusted image is obtained by capturing an image of the reference object illuminated by the adjusted multiple light sources;

[0009] If the adjusted shadow area meets the preset light source adjustment condition, a target light source configuration scheme is determined according to the adjusted illumination directions of the multiple light sources; wherein the target light source configuration scheme is suitable for the portable device to construct a shadowless lighting environment within the target range.

[0010] The shadowless lighting method suitable for portable devices proposed in the embodiment of the present application uses a portable device to capture an image of a reference object within a target range to obtain a reference image, and adjusts multiple light sources on the portable device according to the shadows in the reference image, thereby constructing a shadowless lighting environment within the target range. Compared with the technical solution of using professional shadowless lamps in the related art, the present method uses a portable device to easily and quickly achieve shadowless lighting, which not only reduces the equipment cost, but also improves the convenience of shadowless lighting, thereby meeting the needs of different actual scenes. In addition, the present method can also make corresponding adjustments according to the reference image to adapt to the lighting conditions in the actual scene, thereby improving the flexibility of shadowless lighting.

[0011] Optionally, the portable device is any one of a PDA, a smart phone and a smart wearable device, the multiple light sources include at least two of pupil lights, scanner fill lights and camera fill lights, and the multiple light sources can be moved in at least two directions to adjust the illumination angle.

[0012] Optionally, the portable device further includes an image acquisition unit; the image acquisition of the reference object within the target range at multiple shooting angles to obtain reference images corresponding to the shooting angles includes:

[0013] Turning on the multiple light sources to illuminate the reference object;

[0014] The image acquisition unit is used to acquire images of the reference object illuminated by the multiple light sources at the multiple shooting angles to obtain the reference image; wherein the reference object blocks the illumination light of the multiple light sources and forms a shadow, and the multiple shooting angles are evenly distributed around the reference object.

[0015] Optionally, if the adjusted shadow area satisfies a preset light source adjustment condition, determining a target light source configuration scheme according to the adjusted irradiation directions of the multiple light sources includes:

[0016] If the adjusted shadow areas are all smaller than a preset shadow area threshold, the target light source configuration scheme is determined according to the adjusted irradiation directions of the multiple light sources.

[0017] Optionally, adjusting the illumination directions of the multiple light sources according to the reference shadow area in each of the reference images includes:

[0018] Perform extreme value solving on the reference shadow area to obtain the positive value point of the shadow area;

[0019] The light source closest to the positive value point of the shadow surface is moved to the irradiation direction corresponding to the positive value point of the shadow surface to obtain the adjusted multiple light sources.

[0020] Optionally, if the adjusted shadow areas are all smaller than a preset shadow area threshold, determining the target light source configuration scheme according to the adjusted illumination directions of the multiple light sources includes:

[0021] If the adjusted shadow areas are all smaller than a preset shadow area threshold, determining an intermediate light source configuration scheme according to the adjusted irradiation directions of the multiple light sources;

[0022] irradiating the reference object in an intermediate irradiation direction corresponding to the intermediate light source configuration scheme;

[0023] Capturing an image of a reference object illuminated by the light in the intermediate illumination direction to obtain an intermediate image, and determining an intermediate shadow area in the intermediate image;

[0024] If the intermediate shadow areas tend to be the same, the corresponding intermediate light source configuration scheme is used as the target light source configuration scheme.

[0025] Optionally, the middle shaded areas tend to be the same by:

[0026] Using an optimization algorithm, optimizing the adjusted multiple light sources according to the difference between the intermediate shadow areas in adjacent intermediate images to obtain the optimized multiple light sources;

[0027] Capturing an image of the reference object illuminated by the optimized multiple light sources to obtain an optimized image as an intermediate image;

[0028] Determining an optimized shadow area in the optimized image as an intermediate shadow area;

[0029] Repeat the above step of optimizing the multiple light sources until the intermediate shadow areas tend to be the same.

[0030] Optionally, extracting shadows from the reference image to obtain a reference shadow area in the reference image includes:

[0031] Performing color space conversion on the reference image to obtain a converted image;

[0032] Extracting the brightness channel data of the converted image, and binarizing the brightness channel data based on a preset brightness threshold to obtain binary brightness data;

[0033] Performing mask segmentation on the portion of the binary brightness data that is lower than the preset brightness threshold to obtain a shadow mask;

[0034] The reference shadow area is obtained according to the area of ​​the shadow mask.

[0035] Optionally, a preset configuration scheme is stored in the portable device; before the image acquisition of the reference object within the target range at multiple shooting angles, the method further includes:

[0036] Starting a preset configuration scheme, calling the multiple light sources to illuminate the reference object in a preset illumination direction corresponding to the preset configuration scheme; wherein the reference object blocks the light in the preset illumination direction and forms a shadow;

[0037] The image acquisition of the reference object within the target range at multiple shooting angles respectively includes:

[0038] Images of the reference object illuminated by the light in the preset illumination direction are respectively captured at multiple shooting angles.

[0039] In a second aspect, an embodiment of the present application provides a shadowless lighting device suitable for a portable device, wherein the portable device includes a plurality of light sources with adjustable illumination directions; the device includes:

[0040] An image acquisition module, used to acquire images of reference objects within a target range at multiple shooting angles to obtain reference images corresponding to the shooting angles; wherein the reference objects are objects that can block light and form shadows;

[0041] A shadow extraction module, used to extract shadows from the reference image to obtain a reference shadow area in the reference image;

[0042] A light source adjustment module, configured to adjust the illumination directions of the multiple light sources according to the reference shadow area in each of the reference images, and determine the adjusted shadow area; wherein the adjusted shadow area is the shadow area in the adjusted image, and the adjusted image is obtained by capturing an image of the reference object illuminated by the adjusted multiple light sources;

[0043] A configuration determination module is used to determine a target light source configuration scheme. If the adjusted shadow area meets the preset light source adjustment conditions, the target light source configuration scheme is determined according to the adjusted illumination directions of the multiple light sources; wherein the target light source configuration scheme is suitable for the portable device to construct a shadowless lighting environment within the target range.

[0044] In a third aspect, an embodiment of the present application provides a portable device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method described in any one of the above embodiments by executing the computer instructions.

[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable a computer to execute any one of the methods in the above embodiments.

[0046] In a fifth aspect, an embodiment of the present application provides a computer program product, including computer instructions, and the computer instructions are used to enable a computer to execute any one of the methods in the above embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0048] Figure 1 A step diagram of a shadowless lighting method suitable for portable devices provided in an embodiment of the present application;

[0049] Figure 2 This is a schematic diagram of the structure of the medical PDA in the embodiment of the present application;

[0050] Figure 3 A diagram showing the steps of obtaining a reference image in an embodiment of the present application;

[0051] Figure 4 A diagram showing the steps of obtaining multiple light sources after adjustment in an embodiment of the present application;

[0052] Figure 5 A diagram showing the steps for obtaining a target light source configuration scheme in an embodiment of the present application;

[0053] Figure 6 A diagram showing the steps of optimizing multiple light sources according to the middle shadow area in an embodiment of the present application;

[0054] Figure 7 A diagram showing the steps for obtaining a reference shaded area in an embodiment of the present application;

[0055] Figure 8 A module diagram of a shadowless lighting device suitable for a portable device provided in an embodiment of the present application;

[0056] Fig. 9 A schematic diagram of the structure of a portable device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0058] In some scenes that require high brightness and uniform lighting, such as operating rooms and live broadcast rooms, conventional lighting methods will produce shadows in the scene, which will affect the operator's observation and operation of the target object. In order to meet the requirements of shadowless lighting, professional shadowless lamps are usually used in the above scenes to eliminate shadows in the scene and ensure that the details of the target object can be clearly seen, thus creating a shadowless lighting environment.

[0059] In actual situations, professional shadowless lamps usually have complex structures and are not portable due to the use of multiple light sources and sophisticated lighting design. This means that shadowless lamps must be installed separately when shadowless lighting is required in different scenes, which will bring high cost requirements. In addition, in some cases, professional shadowless lamps cannot be used directly, but require operators with professional knowledge to adjust them to achieve shadowless lighting, making it impossible to quickly build a shadowless lighting environment.

[0060] Based on the above problems, the present application provides a shadowless lighting method and portable device suitable for portable devices, wherein the portable device includes multiple light sources with adjustable illumination directions. The method includes: capturing images of reference objects within a target range at multiple shooting angles to obtain reference images; extracting shadows from the reference images to obtain reference shadow areas in the reference images; adjusting the illumination directions of multiple light sources according to the reference shadow areas in each reference image, and determining the adjusted shadow areas; if the adjusted shadow areas meet the preset light source adjustment conditions, determining the target light source configuration scheme according to the adjusted illumination directions of the multiple light sources; wherein the target light source configuration scheme is suitable for portable devices to construct a shadowless lighting environment within the target range.

[0061] The shadowless lighting method suitable for portable devices proposed in this application can build a shadowless lighting environment within a target range when a professional shadowless lamp cannot be used, thereby improving the speed and convenience of shadowless lighting. In this method, a portable device is used to collect images of reference objects within the target range to obtain a reference image, and multiple light sources on the portable device are adjusted according to the shadows in the reference image, thereby building a shadowless lighting environment within the target range.

[0062] Compared with the technical solution of using professional shadowless lamps in the related art, this method uses portable equipment to easily and quickly achieve shadowless lighting, which not only reduces the equipment cost, but also improves the convenience of shadowless lighting, thereby meeting the needs of different actual scenes.

[0063] In addition, the method can also make corresponding adjustments according to the reference image to adapt to the existing lighting conditions in the actual scene, thereby improving the flexibility of shadowless lighting.

[0064] The shadowless lighting method for portable devices provided in this specification can be applied to portable devices with multiple light sources, wherein the number of light sources is at least two, the irradiation direction of the light sources is adjustable, and the portable device can be any one of a handheld computer, a smart phone, and a smart wearable device. It is understandable that this method can be applied to other devices with multiple light sources other than the above-mentioned portable devices after adaptive modification.

[0065] According to an embodiment of the present application, an embodiment of a shadowless lighting method suitable for a portable device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0066] In this embodiment, a shadowless lighting method suitable for a portable device is provided, which can be used for the above-mentioned portable device, wherein the portable device includes a plurality of light sources with adjustable irradiation directions. Figure 1 As shown, the method includes:

[0067] S100. Capture images of reference objects within a target range at multiple shooting angles to obtain reference images corresponding to the shooting angles; wherein the reference objects are objects that can block light and form shadows.

[0068] S200. Perform shadow extraction on the reference image to obtain a reference shadow area in the reference image.

[0069] S300. Adjust the illumination directions of multiple light sources according to the reference shadow area in each reference image, and determine the adjusted shadow area; wherein the adjusted shadow area is the shadow area in the adjusted image, and the adjusted image is obtained by capturing the image of the reference object illuminated by the adjusted multiple light sources.

[0070] S400. If the adjusted shadow area meets the preset light source adjustment conditions, determine the target light source configuration scheme according to the adjusted illumination directions of the multiple light sources; wherein the target light source configuration scheme is suitable for the portable device to construct a shadowless lighting environment within the target range.

[0071] Among them, the target light source configuration scheme includes but is not limited to the light source irradiation direction, the number of light sources, the type of light source and the brightness of the light source. The content of the target light source configuration scheme is exemplarily described. If the number of light sources in the portable device exceeds the number required to build a shadowless lighting environment, some of the light sources of the portable device can be selected for use, and the remaining light sources can be turned off, thereby reducing the energy consumption of the portable device when performing shadowless lighting. In addition, a light source that meets the requirements can be selected according to the lighting characteristics of different types of light sources. In the case where the brightness of the light source is adjustable, the brightness of the light source can also be adjusted, so as to further eliminate shadows within the target range and improve the shadowless lighting effect.

[0072] Specifically, the reference object can be any object within the target range that can block light and form a shadow. The shape of the reference object is preferably a rotationally symmetrical body, and the rotation axis of the rotationally symmetrical body is perpendicular to the plane within the target range. When the shape of the reference object is a rotationally symmetrical body, the reference object can form a shadow of the same area and shape at any angle around itself, thereby reducing the influence of the shape of the reference object on the shadow area in the reference image and improving the accuracy of adjusting the direction of illumination of the light source. It should be noted that the reference object also needs to have a certain height so that a shadow of sufficient size can be formed for subsequent adjustment of the illumination direction of the light source according to the shadow area. Exemplarily, the reference object can be a non-transparent cylinder with a height of more than 10 cm, such as a thermos cup or a pen.

[0073] Furthermore, by moving the portable device at a uniform speed, images of the reference object within the target range are collected at the same distance at multiple shooting angles around the reference object to obtain reference images corresponding to the above shooting angles, wherein the shooting angles should be evenly distributed around the reference object. The reference image can reflect the lighting conditions within the current target range, such as the presence of strong ambient light in a single direction within the target range, so that when adjusting the illumination direction of the light source, adaptive adjustments can be made according to the above lighting conditions, thereby being able to adapt to the lighting conditions in the environment where the target range is located, thereby improving the shadowless lighting effect. It is understandable that the more reference images collected, the more accurately the changes in the shadow area of ​​the reference object at different shooting angles can be grasped, thereby improving the accuracy of adjusting the illumination direction of the light source.

[0074] In some embodiments, the portable device used to capture the reference image may also be a second portable device different from the first portable device with multiple light sources, that is, the reference image is captured around the reference object by the second portable device, and the reference shadow area is determined; after the reference shadow area is obtained, it is analyzed, and the light source adjustment instruction is sent to the first portable device to adjust the irradiation direction of the light source, thereby achieving the construction of a shadowless lighting environment within the target range. In the above scheme, the reference image is captured by the second portable device, and the light source adjustment instruction is received by the first portable device and the target range is illuminated, thereby reducing the amount of calculation required in a single portable device and improving the calculation speed of the portable device.

[0075] Furthermore, the illumination directions of the multiple light sources are adjusted according to the reference shadow area in each reference image to reduce the shadow area of ​​the reference object at different angles, thereby obtaining the adjusted multiple light sources. In order to test the adjustment effect, the reference object illuminated by the adjusted multiple light sources is imaged to obtain an adjusted image, and the adjusted shadow area is obtained in the same manner as the reference shadow area. The illumination directions of the multiple light sources are further adjusted according to the adjusted shadow area, and the above adjustment steps are repeated until the adjusted shadow area meets the preset light source adjustment conditions. At this time, the target light source configuration scheme is determined according to the adjusted illumination directions of the multiple light sources, and the target light source configuration scheme is used to construct a shadowless lighting environment within the target range.

[0076] It should be noted that the present application can quickly build a shadowless lighting environment within any target range through a portable device, and can automatically adjust the light source according to the ambient lighting conditions within the target range. The operation method is simple, which reduces the time cost for adjusting professional shadowless lamps. Compared with the related art, the present application has higher flexibility and reduces the impact of environmental conditions. It can build a shadowless lighting environment within the target range when professional shadowless lamps cannot be used or when the ambient lighting conditions have a greater impact on the target range, thereby eliminating the shadows generated within the target range and providing convenience for operators.

[0077] The shadowless lighting method suitable for portable devices provided in this embodiment uses a portable device to collect images of reference objects within a target range to obtain a reference image, and adjusts multiple light sources on the portable device according to the shadows in the reference image, thereby constructing a shadowless lighting environment within the target range. Compared with the technical solution of using professional shadowless lamps in the related art, this method uses portable devices to easily and quickly achieve shadowless lighting, which not only reduces the cost of equipment, but also improves the convenience of shadowless lighting, thereby meeting the needs of different actual scenes. In addition, this method can also make corresponding adjustments based on the reference image to adapt to the lighting conditions in the actual scene, thereby improving the flexibility of shadowless lighting.

[0078] As an embodiment of the present application, the portable device is any one of a PDA, a smart phone and a smart wearable device, the multiple light sources include at least two of a pupil light, a scanner fill light and a camera fill light, and the multiple light sources can be moved in at least two directions to adjust the illumination angle.

[0079] Specifically, the portable device can be an electronic device that the operator can carry with him / her, has a certain computing capability, and can perform image processing and calculation on the reference image. In some embodiments, the light source in the portable device can be controlled by a motor so that the light source can move in at least two directions. In other embodiments, the multiple light sources in the portable device can also be distributed in a circular direction and move in a circular direction to ensure uniform illumination within the target range.

[0080] The application scenario of the portable device is explained as an example. When the application scenario is a hospital ward, the portable device can be a medical PDA (Personal Digital Assistant) carried by doctors or nurses. The medical PDA can have multiple light sources including a pupil light, a scanner fill light, and a camera fill light. The pupil light is used to observe the patient's pupil reflection, the scanner fill light is used to provide fill light when scanning a barcode or a QR code, and the camera fill light is used to provide fill light when capturing images. The structure of the medical PDA can refer to Figure 2 When professional shadowless lamps are not available in the ward, doctors or nurses can use the above-mentioned medical PDA to illuminate the target range and make targeted adjustments according to the lighting conditions of the target range, thereby quickly and easily building a shadowless lighting environment within the target range, providing convenience for medical activities.

[0081] Reference Figure 3 As shown, as an embodiment of the present application, the portable device further includes an image acquisition unit; the image acquisition unit performs image acquisition on the reference object within the target range at multiple shooting angles to obtain a reference image corresponding to the shooting angle, including:

[0082] S110. Turn on multiple light sources to illuminate the reference object.

[0083] S120. Using an image acquisition unit, acquire images of a reference object illuminated by multiple light sources at multiple shooting angles to obtain a reference image; wherein the reference object blocks the illumination light of multiple light sources and forms a shadow, and the multiple shooting angles are evenly distributed around the reference object.

[0084] Specifically, the portable device may include multiple light sources and image acquisition units at the same time. When acquiring a reference image, the reference object is imaged by the portable device while ensuring that the illumination angle of the light source to the reference object remains unchanged, that is, ensuring that the shadow area formed by the reference object does not change with the movement of the portable device. The reference image is acquired when multiple light sources are turned on, so that the reference image can reflect the shadow area of ​​the current reference object when it is illuminated by multiple light sources and ambient light, so that the illumination direction of the light source can be adjusted in a targeted manner.

[0085] It is understandable that, when a portable device includes multiple light sources and image acquisition units at the same time, the construction of a shadowless lighting environment can be completed by only one portable device, thereby further improving the convenience of shadowless lighting.

[0086] As an embodiment of the present application, if the adjusted shadow area meets the preset light source adjustment condition, the target light source configuration scheme is determined according to the adjusted illumination directions of the multiple light sources, including:

[0087] S410. If the adjusted shadow areas are all smaller than the preset shadow area threshold, determine the target light source configuration scheme according to the adjusted illumination directions of the multiple light sources.

[0088] Specifically, constructing a shadowless lighting environment within the target range means providing uniform lighting without obvious shadows for the target range. Therefore, the preset light source adjustment condition in this embodiment can be that the adjusted shadow area in each adjusted image is smaller than the preset shadow area threshold, so that there is no obvious shadow within the target range.

[0089] In some embodiments, if the preset light source adjustment conditions cannot be met after multiple adjustments, and the number of adjustments exceeds the threshold, it means that the current light source configuration scheme cannot build a shadowless lighting environment within the target range. At this time, the number of light sources, type of light sources, and brightness of light sources can be adjusted, and the illumination direction of the light source can be readjusted.

[0090] Reference Figure 4 As shown, as an embodiment of the present application, adjusting the illumination directions of multiple light sources according to the reference shadow area in each reference image includes:

[0091] S310. Perform extreme value solution on the reference shadow area to obtain the positive value point of the shadow area.

[0092] S320. Move the light source closest to the positive value point of the shadow surface to the illumination direction corresponding to the positive value point of the shadow surface to obtain multiple adjusted light sources.

[0093] Specifically, when a shadowless lighting environment is not formed within the target range, the reference object forms shadows of different areas at different angles. In the process of adjusting the light source, the maximum shadow area of ​​the reference object can be reduced by adjusting the illumination angle of the light source, thereby satisfying the preset light source adjustment condition that the adjusted shadow area in each adjusted image is less than the preset shadow area threshold.

[0094] Furthermore, multiple reference shadow areas can be obtained based on multiple reference images. The reference shadow areas correspond to the shooting angles one by one. By solving the extreme value of the reference shadow area, the shadow surface positive value point with the largest reference shadow area is determined, and the corresponding shooting angle is determined. The shooting angle is used as the irradiation direction of the adjusted light source, and the light source closest to the shadow surface positive value point is moved to the irradiation direction, thereby reducing the largest reference shadow area in the reference image to meet the above-mentioned preset light source adjustment conditions.

[0095] Reference Figure 5 As shown, as an embodiment of the present application, if the adjusted shadow areas are all smaller than the preset shadow area threshold, the target light source configuration scheme is determined according to the adjusted illumination directions of the multiple light sources, including:

[0096] S412. If the adjusted shadow areas are all smaller than the preset shadow area threshold, determine the intermediate light source configuration scheme according to the adjusted illumination directions of the multiple light sources.

[0097] S414. Irradiate the reference object in the intermediate illumination direction corresponding to the intermediate light source configuration scheme.

[0098] S416. Capture an image of the reference object illuminated by the light in the intermediate illumination direction to obtain an intermediate image, and determine an intermediate shadow area in the intermediate image.

[0099] S418. If the middle shadow areas tend to be the same, the corresponding middle light source configuration scheme is used as the target light source configuration scheme.

[0100] Specifically, constructing a shadowless lighting environment within the target range means providing uniform lighting without obvious shadows for the target range. Therefore, the preset light source adjustment conditions in this embodiment may include that the adjusted shadow area in each adjusted image is smaller than a preset shadow area threshold, so that there is no obvious shadow within the target range; and the intermediate shadow area in each intermediate image tends to be the same, so that the lighting within the target range is uniform.

[0101] In some embodiments, if the preset light source adjustment conditions cannot be met after multiple adjustments, and the number of adjustments exceeds the threshold, it means that the current light source configuration scheme cannot build a shadowless lighting environment within the target range. At this time, the number of light sources, type of light sources, and brightness of light sources can be adjusted, and the illumination direction of the light source can be readjusted.

[0102] Reference Figure 6 As shown, as an embodiment of the present application, the middle shadow areas tend to be the same by the following method:

[0103] S420. Utilizing an optimization algorithm, the adjusted multiple light sources are optimized according to the difference between the intermediate shadow areas in adjacent intermediate images to obtain the optimized multiple light sources.

[0104] S422. Capture images of the reference object illuminated by the optimized multiple light sources to obtain optimized images as intermediate images.

[0105] S424. Determine the optimized shadow area in the optimized image as the middle shadow area.

[0106] S426. Repeat the above steps of optimizing multiple light sources until the middle shadow areas tend to be the same.

[0107] Specifically, according to the distribution of the intermediate shadow area in each intermediate image and the difference between the intermediate shadow areas in adjacent intermediate images, an optimization algorithm is used to search for the most appropriate position of the light source to optimize the adjusted multiple light sources. The optimization algorithm may be any one of the algorithms such as gradient descent method, Lagrange multiplier method, genetic algorithm and particle swarm optimization algorithm.

[0108] The optimization steps are explained exemplarily. When the optimization algorithm is a particle swarm optimization algorithm, the position of the particle represents the position of the light source, and the objective function is the difference between the intermediate shadow areas in adjacent intermediate images. The optimal particle position is searched by the particle swarm optimization algorithm with the goal of minimizing the objective function. After each iteration update of the particle swarm, multiple optimized light sources of the current iteration round are output, and the reference object is illuminated by the optimized multiple light sources. The reference object is imaged at this time to obtain an optimized image as the intermediate image of the next iteration round, and the optimized shadow area in the optimized image is determined as the intermediate shadow area of ​​the next iteration round. If the condition that the intermediate shadow area in each intermediate image tends to be the same is not met, the optimization search for the next iteration round is continued. When the condition that the intermediate shadow area in each intermediate image tends to be the same is met, the optimization search is stopped, and the intermediate light source configuration scheme at this time is output as the target light source configuration scheme.

[0109] Reference Figure 7As shown, as an embodiment of the present application, shadow extraction is performed on a reference image to obtain a reference shadow area in the reference image, including:

[0110] S210. Perform color space conversion on the reference image to obtain a converted image.

[0111] S220. Extract the brightness channel data of the converted image, and binarize the brightness channel data based on a preset brightness threshold to obtain binary brightness data.

[0112] S230. Perform mask segmentation on the portion of the binary brightness data that is lower than a preset brightness threshold to obtain a shadow mask.

[0113] S240. Obtain a reference shadow area according to the area of ​​the shadow mask.

[0114] Specifically, a color space conversion is performed on the reference image, and the reference image is converted into the HSV color space to obtain a converted image. The converted image includes a hue channel, a saturation channel, and a lightness channel, and the lightness channel data is extracted. According to a preset lightness threshold, the lightness channel data is binarized to distinguish the part of the lightness channel data in the converted image that is lower than the preset lightness threshold and the part that is higher than the preset lightness threshold, and obtain binary lightness data. Exemplarily, the part of the lightness channel data in the converted image that is lower than the preset lightness threshold can be set to black, and the part of the lightness channel data in the converted image that is higher than the preset lightness threshold can be set to white.

[0115] Furthermore, the black part in the binary luminance data can approximately represent the shadow area in the reference image. Mask segmentation is performed on the part of the binary luminance data that is lower than the preset luminance threshold, that is, the black part in the binary luminance data is extracted, and the black part is used as a shadow mask, and the reference shadow area is obtained according to the area of ​​the shadow mask.

[0116] As an embodiment of the present application, a preset configuration scheme is stored in the portable device; before capturing images of reference objects within the target range at multiple shooting angles, the method further includes:

[0117] S510. Start a preset configuration scheme, and call multiple light sources to illuminate the reference object in a preset illumination direction corresponding to the preset configuration scheme; wherein the reference object blocks the light in the preset illumination direction and forms a shadow.

[0118] Capture images of reference objects within the target range at multiple shooting angles, including:

[0119] S520. Capture images of the reference object illuminated by light in a preset illumination direction at multiple shooting angles respectively.

[0120] Specifically, the preset configuration scheme can be a target light source configuration scheme obtained by the portable device in the historical working process, or a light source configuration scheme manually set by the operator. In this embodiment, the preset configuration scheme is stored in the portable device and called in the process of constructing the shadowless lighting environment, thereby improving the efficiency of the shadowless lighting.

[0121] Furthermore, after the target light source configuration scheme is adjusted based on the preset configuration scheme, the target light source configuration scheme is stored as the preset configuration scheme. It is understandable that the preset configuration scheme corresponds to the ambient lighting conditions of the target range, and the operator can select according to the corresponding ambient lighting conditions when calling the preset configuration scheme to call the preset configuration scheme that is more in line with the current target range, thereby further improving the efficiency of shadowless lighting.

[0122] Accordingly, please refer to Figure 8 The embodiment of the present application provides a shadowless lighting device suitable for a portable device, wherein the portable device includes a plurality of light sources with adjustable illumination directions; the device includes:

[0123] The image acquisition module 100 is used to acquire images of reference objects within a target range at multiple shooting angles to obtain reference images corresponding to the shooting angles; wherein the reference object is an object that can block light and form a shadow.

[0124] The shadow extraction module 200 is used to extract shadows from a reference image to obtain a reference shadow area in the reference image.

[0125] The light source adjustment module 300 is used to adjust the illumination directions of multiple light sources according to the reference shadow area in each reference image, and determine the adjusted shadow area; wherein the adjusted shadow area is the shadow area in the adjusted image, and the adjusted image is obtained by capturing the image of the reference object illuminated by the adjusted multiple light sources.

[0126] The configuration determination module 400 is used to determine the target light source configuration scheme. If the adjusted shadow area meets the preset light source adjustment conditions, the target light source configuration scheme is determined according to the adjusted illumination directions of the multiple light sources; wherein the target light source configuration scheme is suitable for portable devices to construct a shadowless lighting environment within the target range.

[0127] In some optional embodiments, the portable device is any one of a PDA, a smart phone and a smart wearable device, the multiple light sources include at least two of a pupil light, a scanner fill light and a camera fill light, and the multiple light sources can be moved in at least two directions to adjust the illumination angle.

[0128] In some optional implementations, the portable device further includes an image acquisition unit; the image acquisition module 100 includes:

[0129] The reference irradiation unit is used to turn on a plurality of light sources to irradiate a reference object.

[0130] The image acquisition unit is used to acquire images of a reference object illuminated by multiple light sources at multiple shooting angles using the image acquisition unit to obtain a reference image; wherein the reference object blocks the illumination light of the multiple light sources and forms a shadow, and the multiple shooting angles are evenly distributed around the reference object.

[0131] In some optional implementations, the configuration determination module 400 includes:

[0132] The threshold judgment unit is used to determine the target light source configuration scheme. If the adjusted shadow areas are all smaller than the preset shadow area threshold, the target light source configuration scheme is determined according to the adjusted illumination directions of the multiple light sources.

[0133] In some optional implementations, the light source adjustment module 300 includes:

[0134] The extreme value solving unit is used to solve the extreme value of the reference shadow area to obtain the positive value point of the shadow area.

[0135] The light source adjustment unit is used to move the light source closest to the positive value point of the shadow surface to the irradiation direction corresponding to the positive value point of the shadow surface to obtain a plurality of adjusted light sources.

[0136] In some optional implementations, the threshold determination unit includes:

[0137] The intermediate configuration subunit is used to determine the intermediate light source configuration scheme according to the adjusted irradiation directions of the multiple light sources if the adjusted shadow areas are all smaller than a preset shadow area threshold.

[0138] The intermediate illumination subunit is used to illuminate the reference object in an intermediate illumination direction corresponding to the intermediate light source configuration scheme.

[0139] The intermediate image acquisition subunit is used to acquire an image of a reference object illuminated by light in an intermediate illumination direction, obtain an intermediate image, and determine an intermediate shadow area in the intermediate image.

[0140] The target configuration subunit is used to use the corresponding intermediate light source configuration scheme as the target light source configuration scheme if the intermediate shadow areas tend to be the same.

[0141] In some optional implementations, the threshold determination unit further includes:

[0142] The light source optimization subunit is used to optimize the adjusted multiple light sources according to the difference between the intermediate shadow areas in adjacent intermediate images by using an optimization algorithm to obtain the optimized multiple light sources.

[0143] The intermediate image updating subunit is used to collect images of the reference object illuminated by the optimized multiple light sources to obtain an optimized image as an intermediate image.

[0144] The intermediate shadow updating subunit is used to determine the optimized shadow area in the optimized image as the intermediate shadow area.

[0145] The repeated optimization subunit is used to repeat the above steps of optimizing the multiple light sources until the middle shadow areas tend to be the same.

[0146] In some optional implementations, the shadow extraction module 200 includes:

[0147] The color space conversion unit is used to perform color space conversion on the reference image to obtain a converted image.

[0148] The binarization unit is used to extract the brightness channel data of the converted image and perform binarization processing on the brightness channel data based on a preset brightness threshold to obtain binarized brightness data.

[0149] The mask segmentation unit is used to perform mask segmentation on the part of the binary brightness data that is lower than a preset brightness threshold to obtain a shadow mask.

[0150] The shadow area unit is used to obtain a reference shadow area according to the area of ​​the shadow mask.

[0151] In some optional implementations, a preset configuration scheme is stored in the portable device; the apparatus further includes a preset configuration module, which includes:

[0152] The preset illumination unit is used to start the preset configuration scheme and call multiple light sources to illuminate the reference object in the preset illumination direction corresponding to the preset configuration scheme; wherein the reference object blocks the light in the preset illumination direction and forms a shadow.

[0153] The preset acquisition unit is used to respectively acquire images of a reference object illuminated by light in a preset illumination direction at multiple shooting angles.

[0154] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0155] The shadowless lighting device suitable for portable devices in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0156] See also Fig. 9 , Fig. 9 It is a structural schematic diagram of a portable device provided by an embodiment of the present application. As shown in the figure, the portable device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the portable device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple portable devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 10 is taken as an example.

[0157] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0158] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0159] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created according to the use of the portable device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the portable device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0160] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0161] The portable device further comprises a communication interface 30 for the portable device to communicate with other devices or a communication network.

[0162] The embodiment of the present application also provides a computer-readable storage medium. The above method according to the embodiment of the present application can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0163] The embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the portable device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the portable device executes the method of any embodiment of the present application.

[0164] Although the embodiments of the present application are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations are all within the scope defined by the appended claims.

[0165] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0166] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0167] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0168] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0169] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0170] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0171] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0172] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0173] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

[0174] Although the embodiments of the present application have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A shadowless lighting method suitable for portable devices, characterized in that: The portable device comprises a plurality of light sources with adjustable illumination directions; the method comprises: Capturing images of reference objects within the target range at multiple shooting angles to obtain reference images corresponding to the shooting angles; wherein the reference objects are objects that can block light and form shadows; Performing shadow extraction on the reference image to obtain a reference shadow area in the reference image; Adjusting the illumination directions of the multiple light sources according to the reference shadow area in each of the reference images, and determining an adjusted shadow area; wherein the adjusted shadow area is a shadow area in an adjusted image, and the adjusted image is obtained by capturing an image of the reference object illuminated by the adjusted multiple light sources; If the adjusted shadow area meets the preset light source adjustment condition, a target light source configuration scheme is determined according to the adjusted illumination directions of the multiple light sources; wherein the target light source configuration scheme is suitable for the portable device to construct a shadowless lighting environment within the target range.

2. The method according to claim 1, characterized in that The portable device is any one of a PDA, a smart phone and a smart wearable device, the multiple light sources include at least two of a pupil light, a scanner fill light and a camera fill light, and the multiple light sources can be moved in at least two directions to adjust the illumination angle.

3. The method according to claim 1, characterized in that The portable device further includes an image acquisition unit; the image acquisition of the reference object within the target range is performed at multiple shooting angles to obtain reference images corresponding to the shooting angles, including: Turning on the multiple light sources to illuminate the reference object; The image acquisition unit is used to acquire images of the reference object illuminated by the multiple light sources at the multiple shooting angles to obtain the reference image; wherein the reference object blocks the illumination light of the multiple light sources and forms a shadow, and the multiple shooting angles are evenly distributed around the reference object.

4. The method according to claim 1, characterized in that: If the adjusted shadow area meets the preset light source adjustment condition, determining the target light source configuration scheme according to the adjusted irradiation directions of the multiple light sources includes: If the adjusted shadow areas are all smaller than a preset shadow area threshold, the target light source configuration scheme is determined according to the adjusted irradiation directions of the multiple light sources.

5. The method according to claim 4, characterized in that The adjusting the illumination directions of the multiple light sources according to the reference shadow area in each of the reference images includes: Perform extreme value solving on the reference shadow area to obtain the positive value point of the shadow area; The light source closest to the positive value point of the shadow surface is moved to the irradiation direction corresponding to the positive value point of the shadow surface to obtain the adjusted multiple light sources.

6. The method according to claim 4, characterized in that If the adjusted shadow areas are all smaller than a preset shadow area threshold, determining the target light source configuration scheme according to the adjusted irradiation directions of the multiple light sources includes: If the adjusted shadow areas are all smaller than a preset shadow area threshold, determining an intermediate light source configuration scheme according to the adjusted irradiation directions of the multiple light sources; irradiating the reference object in an intermediate irradiation direction corresponding to the intermediate light source configuration scheme; Capturing an image of a reference object illuminated by the light in the intermediate illumination direction to obtain an intermediate image, and determining an intermediate shadow area in the intermediate image; If the intermediate shadow areas tend to be the same, the corresponding intermediate light source configuration scheme is used as the target light source configuration scheme.

7. The method according to claim 6, characterized in that The middle shaded areas tend to be the same as determined by: Using an optimization algorithm, optimizing the adjusted multiple light sources according to the difference between the intermediate shadow areas in adjacent intermediate images to obtain the optimized multiple light sources; Capturing an image of the reference object illuminated by the optimized multiple light sources to obtain an optimized image as an intermediate image; Determining an optimized shadow area in the optimized image as an intermediate shadow area; Repeat the above step of optimizing the multiple light sources until the intermediate shadow areas tend to be the same.

8. The method according to claim 1, characterized in that: The step of extracting shadows from the reference image to obtain a reference shadow area in the reference image includes: Performing color space conversion on the reference image to obtain a converted image; Extracting the brightness channel data of the converted image, and binarizing the brightness channel data based on a preset brightness threshold to obtain binary brightness data; Performing mask segmentation on the portion of the binary brightness data that is lower than the preset brightness threshold to obtain a shadow mask; The reference shadow area is obtained according to the area of ​​the shadow mask.

9. The method according to any one of claims 1 to 8, characterized in that The portable device stores a preset configuration scheme; Before respectively capturing images of the reference object within the target range at multiple shooting angles, the method further includes: Starting a preset configuration scheme, calling the multiple light sources to illuminate the reference object in a preset illumination direction corresponding to the preset configuration scheme; wherein the reference object blocks the light in the preset illumination direction and forms a shadow; The image acquisition of the reference object within the target range at multiple shooting angles respectively includes: Images of the reference object illuminated by the light in the preset illumination direction are respectively captured at multiple shooting angles.

10. A portable device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 9 by executing the computer instructions.