CN109634027A - A kind of light-source brightness and the adjusting method and device of position - Google Patents

A kind of light-source brightness and the adjusting method and device of position Download PDF

Info

Publication number
CN109634027A
CN109634027A CN201910008342.0A CN201910008342A CN109634027A CN 109634027 A CN109634027 A CN 109634027A CN 201910008342 A CN201910008342 A CN 201910008342A CN 109634027 A CN109634027 A CN 109634027A
Authority
CN
China
Prior art keywords
image
subject pixel
accounting
painting object
light source
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.)
Granted
Application number
CN201910008342.0A
Other languages
Chinese (zh)
Other versions
CN109634027B (en
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.)
Guangdong Intellect Cloud Picture Polytron Technologies Inc
Original Assignee
Guangdong Intellect Cloud Picture Polytron Technologies Inc
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 Guangdong Intellect Cloud Picture Polytron Technologies Inc filed Critical Guangdong Intellect Cloud Picture Polytron Technologies Inc
Priority to CN201910008342.0A priority Critical patent/CN109634027B/en
Publication of CN109634027A publication Critical patent/CN109634027A/en
Application granted granted Critical
Publication of CN109634027B publication Critical patent/CN109634027B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Image Generation (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a kind of light-source brightness and the adjusting method of position, device, mobile terminal and readable storage medium storing program for executing, method includes the shooting image for obtaining Painting Object, and carries out gray proces to shooting image, obtains gray level image;It calculates Painting Object main body in gray level image and obtains the first Painting Object accounting value in the accounting of entire gray level image;The pixel of Painting Object main body will be belonged in gray level image, as image subject pixel, and according to the gray value of each image subject pixel, image subject pixel accounting value in each default gray scale interval is calculated, the first image subject pixel accounting data are obtained;Light source position is adjusted according to the first Painting Object accounting value, according to the brightness of the first image subject pixel accounting data point reuse light source, the adjusting of lamplight brightness and position can be carried out automatically by implementing the embodiment of the present invention, avoid the problem that manual operation is cumbersome and manual operation is unstable by experience polishing effect, influences final painting effect.

Description

A kind of light-source brightness and the adjusting method and device of position
Technical field
The present invention relates to light sources to adjust field, and in particular to a kind of light-source brightness and the adjusting method and device of position.
Background technique
It lives and be unable to do without light, when carrying out the painting sketchings such as personage, still life, have to the lighting effect of Painting Object certain It is required that needing to make Painting Object under the light source of specified conditions as far as possible, there is three-dimensional sense and shade is abundant, so Drawing main body can be preferably embodied, preferable painting effect is obtained.
Currently, being usually the live three-dimensional chiaroscuro effect according to Painting Object under light variation and operator's accumulation Experience carries out the artificial dimming mode polishing of lamplight brightness, irradiating angle, or even when long-time is painted, it is also necessary to according to sunlight It shines the change of environment light source caused by situations such as intensity and morning and evening sun angles change and adjusts lamplight brightness repeatedly to keep The unified lighting effect of Painting Object main body.Since manual operation is cumbersome, and manual operation polishing relies on experience, and polishing effect is not Stablize, influences final painting effect.
Summary of the invention
The embodiment of the present invention provides a kind of light-source brightness and adjusting method, device, mobile terminal and the computer of position can Storage medium is read, the adjusting of lamplight brightness and position can be carried out automatically, avoids manual operation cumbersome and manual operation is by warp The problem of testing unstable polishing effect, influence final painting effect.
First embodiment of the invention provides the adjusting method of a kind of light-source brightness and position, including
The shooting image of Painting Object is obtained, and gray proces are carried out to the shooting image, obtains gray level image;
Painting Object main body in the gray level image is calculated to obtain the first Painting Object in the accounting of entire gray level image and account for Ratio;
The pixel of Painting Object main body will be belonged in the gray level image, as image subject pixel, and according to The gray value of each described image subject pixel point calculates image subject pixel accounting value in each default gray scale interval, obtains the One image subject pixel accounting data;
The light source position is adjusted according to the first Painting Object accounting value, according to the first image subject pixel point The brightness of light source described in accounting data point reuse.
Further, the gray value according to each described image subject pixel point calculates and schemes in each default gray scale interval As subject pixel point accounting value, the first image subject pixel accounting data are obtained, specifically:
The all pixels point of the gray level image is divided into according to the gray value of all pixels point in the gray level image Each default gray scale interval;
According in each default gray scale interval, the number of image subject pixel calculates each default gray scale The image subject pixel accounting value in section;
All described image subject pixel point accounting values are extracted, the first image subject pixel point accounting data are obtained.
It is further, described that the light source position is adjusted according to the first Painting Object accounting value, specifically:
Judge whether the first Painting Object accounting value reaches the first preset threshold;
If the first Painting Object accounting value reaches the first preset threshold, keep the light source initial position not Become;
If the first Painting Object accounting value is lower than the first preset threshold, following steps are executed to the position of the light source It sets and is adjusted:
The light source is adjusted to the second position by desired guiding trajectory, obtains the second shooting image of Painting Object at this time, and The second shooting image is subjected to gray proces, the second Painting Object accounting value is calculated;
By the second Painting Object accounting value respectively with first preset threshold and the first Painting Object accounting value into Row compares;
If the second Painting Object accounting value is greater than the first Painting Object accounting value, and the second object accounting Value is not up to first preset threshold, then presses the positive direction of the desired guiding trajectory, the light source is adjusted to the third place;
If the second Painting Object accounting value is greater than the first Painting Object accounting value, and the second object accounting Value has reached first preset threshold, then keeps the light source in the second position, constant;
If the second Painting Object accounting value is less than the first Painting Object accounting value, first the light source is moved back to described Initial position is then adjusted the light source to the 4th position by the opposite direction of desired guiding trajectory.
Further, the brightness of the light source according to the first image subject pixel point accounting data point reuse, tool Body are as follows:
Judge in the first image subject pixel point accounting data, it is default that image subject pixel accounting value is greater than second The number of the gray scale interval of threshold value, if be more than predetermined number;
If being more than the predetermined number, the brightness for keeping the light source current is constant;
If being no more than the predetermined number, executes following steps and the brightness of the light source is adjusted:
The brightness of the light source is adjusted by preset adjustment direction, wherein the preset adjustment direction includes Preset grade is lightened by the preset grade of the light source dim, or by the light source;
The third for obtaining Painting Object at this time shoots image, and third shooting image is carried out gray proces, then The second image subject pixel accounting data are calculated;
By the second image subject pixel accounting data and the first image subject pixel point accounting data, carry out It compares;
If in the second image subject pixel accounting data, image subject pixel accounting value is greater than the second default threshold The number of the gray scale interval of value is more than the first image subject pixel point accounting data, and is less than the predetermined number, then Continue to be adjusted the brightness of the light source by preset adjustment direction;
If in the second image subject pixel accounting data, image subject pixel accounting value is greater than the second default threshold The number of the gray scale interval of value is more than the first image subject pixel point accounting data, and is more than the predetermined number, then stops It only adjusts, keeps the present intensity of the light source constant;
If in the second image subject pixel accounting data, image subject pixel accounting value is greater than the second default threshold The number of the gray scale interval of value is less than the first image subject pixel point accounting data, then presses and the preset adjustment Contrary direction is adjusted the brightness of the light source.
On the basis of first embodiment of the invention, second embodiment is provided;
Second embodiment of the invention provides the adjusting method of a kind of light-source brightness and position, is included in preset duration It is interior, the light-source brightness of preset times provided such as first embodiment of the invention and the adjusting method of position are provided.
On the basis of first embodiment of the invention, 3rd embodiment is additionally provided
Third embodiment of the invention provides the regulating device of a kind of light-source brightness and position, including image grayscale handles mould Block, Painting Object account for ratio calculation module, image subject pixel accounting data computation module and light source adjusting module;
Wherein, described image gradation processing module, for obtaining the shooting image of Painting Object, and to the shooting image Gray proces are carried out, gray level image is obtained;
The Painting Object accounts for ratio calculation module, for calculating in the gray level image Painting Object main body in entire ash The accounting of image is spent, the first Painting Object accounting value is obtained;
Described image subject pixel point accounting data computation module, for Painting Object will to be belonged in the gray level image The pixel of main body calculates each default as image subject pixel, and according to the gray value of each described image subject pixel point Image subject pixel accounting value in gray scale interval obtains the first image subject pixel accounting data;
The light source adjusting module, for adjusting the light source position according to the first Painting Object accounting value, according to The brightness of light source described in the first image subject pixel point accounting data point reuse.
On the basis of first embodiment of the invention, fourth embodiment is additionally provided
Fourth embodiment of the invention provides a kind of terminal device, including processor, memory and is stored in described deposit In reservoir and it is configured as the computer program executed by the processor, it is real that the processor, which executes the computer program, Light-source brightness and the adjusting method of position described in existing first embodiment of the invention and second embodiment.
On the basis of first embodiment of the invention, the 5th embodiment is additionally provided
Fifth embodiment of the invention provides a kind of computer readable storage medium, the computer readable storage medium packet Computer program is included, the equipment where the computer program controls the computer readable storage medium when running executes this hair The adjusting method of bright first embodiment and second embodiment, the light-source brightness and position.
By implementing the embodiment of the present invention, have the advantages that:
The embodiment of the invention provides a kind of light-source brightness and the adjusting method of position, device, mobile terminal and readable deposit Storage media, by obtain Painting Object shooting image, and to image carry out gray proces after, calculate in image, drawing pair As the accounting value of main body, the position of adjustment light source is adjusted according to accounting value, while according in gray level image, belonging to Painting Object master The gray value of the pixel of body calculates image subject pixel accounting in each gray scale interval in the distribution situation of each gray scale interval Value obtains the first image subject pixel accounting data, then according to the accounting data of the first obtained image subject pixel The brightness of light source is adjusted, by implementing the embodiment of the present invention, the position and brightness that can focus source automatically are adjusted, keep away Exempted from it is manually-operated cumbersome, simultaneously because manual operation by experience carry out polishing, it may appear that deviation influences final drawing Effect, and the present invention is according to Painting Object main body, each pixel gray value, carry out a series of adjustment, exclude it is artificial because The interference of element, polishing effect are more stable.
Detailed description of the invention
Fig. 1 is the flow diagram of the adjusting method of a kind of light-source brightness that first embodiment of the invention provides and position;
Fig. 2 is the structural schematic diagram of the regulating device of a kind of light-source brightness that second embodiment of the invention provides and position;
Description of symbols: image grayscale processing module 210, Painting Object account for ratio calculation module 220, image subject picture Vegetarian refreshments accounting data computation module 230, light source adjusting module 240.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
As shown in Figure 1, a kind of brightness for adjustment light source that first embodiment of the invention provides and the method for position include step It is rapid:
S101, the shooting image for obtaining Painting Object, and gray proces are carried out to shooting image, obtain gray level image.
S102, accounting of the Painting Object main body in entire gray level image, the first Painting Object of acquisition in gray level image are calculated Accounting value.
S103, the pixel that Painting Object main body will be belonged in gray level image, as image subject pixel, and according to The gray value of each image subject pixel calculates image subject pixel accounting value in each default gray scale interval, obtains the first figure As subject pixel point accounting data.
S104, light source position is adjusted according to the first Painting Object accounting value, according to the first image subject pixel accounting number According to the brightness of adjustment light source.
For step S101, preferred, the sliding rail that can go up and down can be set in the top of Painting Object to install Lamp dimmer installs polishing lamp on lamp dimmer, changes the position of lamp dimmer by sliding rail, to change light The position in source draws light source close or remote from Painting Object;Change the brightness and projectional angle of light by lamp dimmer Degree.Usually when starting beat light adjustment, lamp dimmer manually can be set into an elemental height in advance, in order to Light modulation calculating is carried out since this position.Such as according to drawing needs, polishing lamp is initially adjusted to Painting Object is arrived in setting 45 Spend oblique upper position.
And then in the position that painter paints, corresponding orientation setting camera shoots Painting Object, excellent Choosing, the picture for keeping camera to take when setting is exactly that the drawing for including is found a view picture when corresponding drawing is completed, so as to According to the variation of available light the time captured in real-time Painting Object of setting image.
Need to illustrate that Painting Object can be, but not limited to following a few classes, people, all kinds of animals and all kinds of still lives.
After the shooting image for obtaining Painting Object, need to carry out gray proces to shooting image, it is preferred that by following Mode handles the shooting image of Painting Object:
Gray proces are carried out with image of the weighted mean method formula to shooting, obtain the grayscale image of image.
Gray proces weighted mean method formula: d (i, j)=0.30R (i, j)+0.59G (i, j)+0.11B (i, j) wherein, I, j represents a pixel in the position of two-dimensional space vector, it may be assumed that the i-th row, jth column.According to above-mentioned formula, calculate in image The gray value of each pixel, value range are 0-255, make image that black-white-gray state be presented.
For step S102, in gray level image, more than there is Painting Object, further include some backgrounds,
It needs to count in gray level image at this time, belongs to pixel the accounting in a whole gray level image of Painting Object main body Than to obtain the first Painting Object accounting value, it should be noted that for identifying the image subject and background of gray level image, Can preferably following manner be used:
It first passes through in advance and establishes the identification model of comprehensive people, animal and all kinds of articles to judge Painting Object: root According to shape, color, texture or the material of the different spaces density such as drawing Shi Suohui various people, animal, the still life object being related to Equal combinations arrangement feature, is extracted the feature vector of various Subject-Humans, animal, still life object, is carried out using convolutional neural networks Learning training divides an image into M*N grid spaces, calculate points and the total point of images of items in each grid spaces The ratio between number, obtains M*N dimensional feature vector, by recognition training repeatedly, mentions in the Painting Object people that respectively classifies from training set, article Standard form is taken out, all kinds of Painting Objects is established and judges identification model.
When judgement, after the image that shooting is obtained carries out gray proces, the feature vector of image is extracted, is drawn with established It draws object and judges that identification model is compared one by one, sentence the Painting Object main body identified in gray level image, it should be noted that Above-mentioned Painting Object main body is also possible that the combination of selected background image and Painting Object, can will take the photograph by actual conditions As the object of image that head is shot carries out any combination, it is set as Painting Object main body together, comes as a whole when judging Accounting of the Painting Object main body in a whole gray level image is calculated, in addition there are various ways can be realized to grayscale image As in, the main body judges of Painting Object, details are not described herein.
After identifying the Painting Object main body in gray level image, it can will belong to the pixel of Painting Object main body, mention It takes out, calculates in gray level image, accounting of the Painting Object main body in entire gray level image, obtain the first Painting Object accounting Value.
For step S103, according to the gray value of all pixels point in gray level image, by all pixels point of gray level image, It is divided into each default gray scale interval;
According in each default gray scale interval, the number of image subject pixel calculates the figure of each default gray scale interval As subject pixel point accounting value;
All image subject pixel accounting values are extracted, the first image subject pixel accounting data are obtained.
Preferably, 0~255 gray value is divided into multiple gray scale intervals, one ash of each interval division in advance first Angle value distribution;For example, 0~255 gray value is divided into 5 sections with 50 for one section, 0~50,51~100 is obtained, 101~150,151~200,201~255,5 gray scale intervals, to obtain each default gray scale interval;It should be noted that each The setting of a gray scale interval can be changed according to the actual situation.
After gray scale interval setting finishes, the pixel of Painting Object main body will be belonged in image, as image master Each image subject pixel is subdivided into, different gray areas by body image vegetarian refreshments according to the gray value of each image subject pixel Between.For statistics each in default gray scale interval, the number of image subject pixel calculates accounting value, to obtain the first image Subject pixel point accounting data.
For step S104, it is divided into two set-up procedures, first is that light source position is adjusted according to the first Painting Object accounting value, It is specific:
Judge whether the first Painting Object accounting value reaches the first preset threshold;
If the first Painting Object accounting value reaches the first preset threshold, keep light source constant in initial position;
If the first Painting Object accounting value is lower than the first preset threshold, executes following steps and the position of light source is adjusted It is whole:
Light source is adjusted to the second position by desired guiding trajectory, obtains the second shooting image of Painting Object at this time, and by the Two shooting images carry out gray proces, and the second Painting Object accounting value is calculated;
Second Painting Object accounting value is compared with the first preset threshold and the first Painting Object accounting value respectively;
If the second Painting Object accounting value is greater than the first Painting Object accounting value, and the second object accounting value is not up to first Preset threshold then presses the positive direction of desired guiding trajectory, light source is adjusted to the third place;
If the second Painting Object accounting value is greater than the first Painting Object accounting value, and the second object accounting value has reached first Preset threshold then keeps light source in the second position, constant;
If light source is first moved back to initial position less than the first Painting Object accounting value by the second Painting Object accounting value, after And light source is adjusted to the 4th position by the opposite direction of desired guiding trajectory.
It is preferred: the first preset threshold being set as 45%, after calculating the first Painting Object accounting value, judges first Whether drawing accounting value reaches 45%, if reached, illustrates that the position of light source at this time is just suitable, does not need to adjust again, Therefore keep light source constant in initial position.
If being lower than 45%, controls lamp dimmer and moved in orbit so that polishing lamp is adjusted to preset track It is whole.Wherein, preset track can be, but not limited to for it is following any one, be moved to the left a unit distance, move right one A unit distance moves forward a unit distance, moves backward a unit distance or the certain degree of rotation, changes light source and throws Firing angle degree etc..It should be understood that mobile distance can be modified and set according to the actual situation, in addition, passing through rotation Certain degree changes the crevice projection angle of light source, also belongs to the scope of desired guiding trajectory.
For example, control lamp dimmer is moved in orbit so that polishing lamp is moved to the left the distance of a unit, adjustment To the second position.
It is adjusting to the second position, is needing to obtain the second shooting image in the shooting image for obtaining Painting Object at this time, Gray proces are carried out again, are performed simultaneously step S102, are operated the accounting for calculating Painting Object subject pixel point at this time, obtain To the second Painting Object accounting value.
And then it is compared with the first preset threshold and the first Painting Object accounting value, if the second accounting value reaches at this time First preset threshold such as 45%, illustrates that the position of light source at this time is just suitable, does not need to adjust again.
If the second Painting Object accounting value is greater than the first Painting Object accounting value, but not up to 45% at this time, then illustrate elder generation This operation for being moved to the left a unit is effective, i.e. accounting ratio improves, then controls lamp dimmer toward last adjustment Positive direction continue to move to a unit distance, i.e., a list is moved in direction identical with the direction that first time is adjusted again to the left Position, adjusts to the third place, is then shot again to Painting Object, gray proces, calculate the accounting value of Painting Object, root It is adjusted again in a manner described according to accounting value, so circulation is until Painting Object accounting value is more than 45%;
When being, if the second Painting Object accounting value illustrates less than the first Painting Object accounting value, the direction of adjustment is malfunctioned It is invalid, it light source is first moved back to initial position at this time, then adjusts light source to the 4th position by the opposite direction of desired guiding trajectory.
It is to be moved to the left a unit, but find that Painting Object accounting value becomes smaller after comparing when adjustment for the first time , light source is first adjusted back to initial position at this time, is then moved right a unit by opposite direction, is then carried out again to drawing Draw object then Painting Object is shot again, gray proces, calculate the accounting value of Painting Object, pressed according to accounting value Aforesaid way is adjusted again, and so circulation is until Painting Object accounting value is more than 45%;
It is briefly described for example: judging whether Painting Object reaches 45% after first mobile, as reached, complete light projection Angle and distance adjustment, the i.e. adjustment of light source position.If still being below 45%, judge that accounting data adjusted are greater than Accounting data before being also less than adjustment control lamp dimmer toward the same of last adjustment if accounting ratio improves Direction continues to move to a unit distance, otherwise then mobile to opposite direction.The above method is constantly repeated until drawing pair in image The point of elephant reaches 45% in the accounting ratio of entire painting canvas.
It is specific for the adjustment of light-source brightness: to judge in the first image subject pixel accounting data, image subject picture Vegetarian refreshments accounting value is greater than the number of the gray scale interval of the second preset threshold, if is more than predetermined number;
If being more than predetermined number, the brightness for keeping light source current is constant;
If being no more than predetermined number, executes following steps and the brightness of light source is adjusted:
The brightness of light source is adjusted by preset adjustment direction, wherein preset adjustment direction includes by light source tune Dark preset grade, or light source is lightened into preset grade;
The third for obtaining Painting Object at this time shoots image, and third shooting image is carried out gray proces, then calculates Obtain the second image subject pixel accounting data;
By the second image subject pixel accounting data and the first image subject pixel accounting data, it is compared;
If in the second image subject pixel accounting data, image subject pixel accounting value is greater than the second preset threshold The number of gray scale interval more than the first image subject pixel accounting data, and is less than predetermined number, then continues by preset Adjustment direction is adjusted the brightness of light source;
If in the second image subject pixel accounting data, image subject pixel accounting value is greater than the second preset threshold The number of gray scale interval more than the first image subject pixel accounting data, and is more than predetermined number, then stops adjusting, keeps The present intensity of light source is constant;
If in the second image subject pixel accounting data, image subject pixel accounting value is greater than the second preset threshold The number of gray scale interval is less than the first image subject pixel accounting data, then presses the side opposite with preset adjustment direction To being adjusted to the brightness of light source.
It is preferred: the second preset value being set as 20%, predetermined number is set as 3.
It is calculated in each default gray scale interval first, the number of image subject pixel, calculates each default gray scale In section, the accounting value of image subject pixel obtains the first image subject pixel accounting data;
When carrying out lamplight brightness adjustment, judges the distribution proportion of the point of each gray scale interval, judge the first image subject picture In vegetarian refreshments accounting data, image subject pixel accounting value is more than the number of 20% gray scale interval, if it exceeds 3, then it says Bright light-source brightness at this time does not need properly to adjust.
If no more than 3, control system control lamp dimmer lightens or dims level-one light.
Then it executes again, Painting Object at this time is shot, obtain shooting image, shooting image is subjected to gray scale Processing, and image subject pixel accounting data are calculated, obtain the second image subject pixel accounting data;Then it carries out again It compares;
If at this point, it is pre- that image subject pixel accounting value is greater than second in the second image subject pixel accounting data If the number of the gray scale interval of threshold value, i.e., increases in the distribution of the point in each section, continue same adjustment mode, otherwise on the contrary Adjust lamplight brightness;Constantly repetition adjusts and calculates the distribution accounting of the gray scale interval in division of Painting Object point until meeting The points distribution of 3 or more gray scale intervals reaches 20% or more and completes brightness adjustment.
By implementing first embodiment of the invention, lamp can be controlled according to the shade and shaded area of main body in photo Light obtains better painting effect so that light is automatically adjusted according to shooting main body effect to meet drawing needs
On the basis of first embodiment of the invention, correspondence provides second embodiment
Second embodiment of the invention provides, and the adjusting method of a kind of light-source brightness and position includes:
In preset duration, the light-source brightness provided such as first embodiment of the invention and the position of preset times are provided Adjusting method.
At one in prolonged painting process, a period is set, repeats this by period regular time The adjusting method of light-source brightness and position that invention first embodiment provides, such as: the often total time span of drawing is 2 small When, the adjusting method that light-source brightness and position that a first embodiment of the invention provides were executed at interval of 10 minutes is set, then It needs to be implemented altogether 12 times.
When painting due to long-time, the ring caused by situations such as the sun shines intensity and the variation of morning and evening sun angles is needed The change of border light source and adjust lamplight brightness repeatedly to keep the unified lighting effect of Painting Object main body.Manual operation polishing according to By experience, polishing effect is unstable, and needs to change adjustment lamplight brightness and angle according to environment light in real time, it is troublesome in poeration and It is easy to change the performance of Painting Object shade, influences painting effect.And by implementing the second embodiment of the present invention, Neng Gougen It adjusts light in real time according to the variation of environment light source to keep light source consistency, Painting Object is obtained when long-time is painted Lighting effects that are stable, three-dimensional and having a sense of hierarchy, improve painting effect.
On the basis of first embodiment of the invention, 3rd embodiment is provided;
As shown in Fig. 2, third embodiment of the invention, the regulating device of a kind of light-source brightness and position, including figure are provided As gradation processing module 210, Painting Object account for ratio calculation module 220, image subject pixel accounting data computation module 230 With light source adjusting module 240;
Wherein, image grayscale processing module 210 is carried out for obtaining the shooting image of Painting Object, and to shooting image Gray proces obtain gray level image;
Painting Object accounts for ratio calculation module 220, for calculating in gray level image Painting Object main body in entire grayscale image The accounting of picture obtains the first Painting Object accounting value;
Image subject pixel accounting data computation module 230, for Painting Object main body will to be belonged in gray level image Pixel calculate each default gray scale interval as image subject pixel, and according to the gray value of each image subject pixel Middle image subject pixel accounting value obtains the first image subject pixel accounting data;
Light source adjusting module 240, for adjusting light source position according to the first Painting Object accounting value, according to the first image master The brightness of body image vegetarian refreshments accounting data point reuse light source.
Preferably, image subject pixel accounting data computation module 230 calculates image subject in each default gray scale interval Pixel accounting value obtains the first image subject pixel accounting data, specifically: according to all pixels point in gray level image The all pixels point of gray level image is divided into each default gray scale interval by gray value;
According in each default gray scale interval, the number of image subject pixel calculates the figure of each default gray scale interval As subject pixel point accounting value;
All image subject pixel accounting values are extracted, the first image subject pixel accounting data are obtained.
Preferred light source adjusting module 240, further includes light source position adjustment unit and light-source brightness adjustment unit.
Light source position adjustment unit is used for, and judges whether the first Painting Object accounting value reaches the first preset threshold;
If the first Painting Object accounting value reaches the first preset threshold, keep light source constant in initial position;
If the first Painting Object accounting value is lower than the first preset threshold, executes following steps and the position of light source is adjusted It is whole:
Light source is adjusted to the second position by desired guiding trajectory, obtains the second shooting image of Painting Object at this time, and by the Two shooting images carry out gray proces, and the second Painting Object accounting value is calculated;
Second Painting Object accounting value is compared with the first preset threshold and the first Painting Object accounting value respectively;
If the second Painting Object accounting value is greater than the first Painting Object accounting value, and the second object accounting value is not up to first Preset threshold then presses the positive direction of desired guiding trajectory, light source is adjusted to the third place;
If the second Painting Object accounting value is greater than the first Painting Object accounting value, and the second object accounting value has reached first Preset threshold then keeps light source in the second position, constant;
If light source is first moved back to initial position less than the first Painting Object accounting value by the second Painting Object accounting value, after And light source is adjusted to the 4th position by the opposite direction of desired guiding trajectory.
Light-source brightness adjustment unit is used for: being judged in the first image subject pixel accounting data, image subject pixel Accounting value is greater than the number of the gray scale interval of the second preset threshold, if is more than predetermined number;
If being more than predetermined number, the brightness for keeping light source current is constant;
If being no more than predetermined number, executes following steps and the brightness of light source is adjusted:
The brightness of light source is adjusted by preset adjustment direction, wherein preset adjustment direction includes by light source tune Dark preset grade, or light source is lightened into preset grade;
The third for obtaining Painting Object at this time shoots image, and third shooting image is carried out gray proces, then calculates Obtain the second image subject pixel accounting data;
By the second image subject pixel accounting data and the first image subject pixel accounting data, it is compared;
If in the second image subject pixel accounting data, image subject pixel accounting value is greater than the second preset threshold The number of gray scale interval more than the first image subject pixel accounting data, and is less than predetermined number, then continues by preset Adjustment direction is adjusted the brightness of light source;
If in the second image subject pixel accounting data, image subject pixel accounting value is greater than the second preset threshold The number of gray scale interval more than the first image subject pixel accounting data, and is more than predetermined number, then stops adjusting, keeps The present intensity of light source is constant;
If in the second image subject pixel accounting data, image subject pixel accounting value is greater than the second preset threshold The number of gray scale interval is less than the first image subject pixel accounting data, then presses the side opposite with preset adjustment direction To being adjusted to the brightness of light source.
Fourth embodiment is provided on the basis of first embodiment of the invention
Fourth embodiment of the invention provides a kind of terminal device, including processor, memory and is stored in memory In and be configured as by processor execute computer program, processor execute computer program be realize the present invention first implement The adjusting method of light-source brightness and position that example provides.
In first embodiment of the invention on the basis of first embodiment of the invention, the 5th embodiment is provided;
Fifth embodiment of the invention provides a kind of computer readable storage medium, and computer readable storage medium includes depositing The computer program of storage, wherein the equipment in computer program operation where control computer readable storage medium executes sheet The adjusting method of light-source brightness and position that invention first embodiment provides.
It is had the following beneficial effects: by implementing the embodiment of the present invention
The embodiment of the invention provides a kind of light-source brightness and the adjusting method of position, device, mobile terminal and storage to be situated between Matter, by obtain Painting Object shooting image, and to image carry out gray proces after, calculate in image, Painting Object master The accounting value of body adjusts the position of adjustment light source according to accounting value, while according in gray level image, belonging to Painting Object main body The gray value of pixel calculates image subject pixel accounting value in each gray scale interval in the distribution situation of each gray scale interval, The first image subject pixel accounting data are obtained, are then adjusted according to the accounting data of the first obtained image subject pixel The brightness of whole light source, by implementing the embodiment of the present invention, the position and brightness that can focus source automatically are adjusted, and are avoided It is manually-operated cumbersome, simultaneously because manual operation carries out polishing by experience, it may appear that deviation influences final drawing effect Fruit, and the present invention is according to Painting Object main body, each pixel gray value, carry out a series of adjustment, exclude human factor Interference, polishing effect is more stable.
It should be noted that the apparatus embodiments described above are merely exemplary, wherein being used as separate part description Module may or may not be physically separated, the component shown as module may or may not be Physical module, it can it is in one place, or may be distributed on multiple network modules.It can be according to the actual needs Some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.In addition, device provided by the invention is implemented In example attached drawing, the connection relationship between module indicates there is communication connection between them, specifically can be implemented as one or more Communication bus or signal wire.Those of ordinary skill in the art are without creative efforts, it can understand and real It applies.
It is the preferred embodiment of the present invention above, it is noted that for those skilled in the art, Various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also considered as this hair Bright protection scope.

Claims (8)

1. a kind of light-source brightness and the adjusting method of position characterized by comprising
The shooting image of Painting Object is obtained, and gray proces are carried out to the shooting image, obtains gray level image;
It calculates Painting Object main body in the gray level image and obtains the first Painting Object accounting in the accounting of entire gray level image Value;
The pixel of Painting Object main body will be belonged in the gray level image, as image subject pixel, and according to each institute The gray value of image subject pixel is stated, image subject pixel accounting value in each default gray scale interval is calculated, obtains the first figure As subject pixel point accounting data;
The position that the light source is adjusted according to the first Painting Object accounting value is accounted for according to the first image subject pixel point Than the brightness of light source described in data point reuse.
2. light-source brightness as described in claim 1 and the adjusting method of position, which is characterized in that described according to each described image The gray value of subject pixel point calculates image subject pixel accounting value in each default gray scale interval, obtains the first image subject Pixel accounting data, specifically:
The all pixels point of the gray level image is divided into each pre- according to the gray value of all pixels point in the gray level image If gray scale interval;
According in each default gray scale interval, the number of image subject pixel calculates each default gray scale interval Image subject pixel accounting value;
All described image subject pixel point accounting values are extracted, the first image subject pixel point accounting data are obtained.
3. light-source brightness as described in claim 1 and the adjusting method of position, which is characterized in that described to be drawn according to described first It draws object accounting value and adjusts the light source position, specifically:
Judge whether the first Painting Object accounting value reaches the first preset threshold;
If the first Painting Object accounting value reaches the first preset threshold, keep the light source constant in initial position;
If the first Painting Object accounting value is lower than the first preset threshold, execute following steps to the position of the light source into Row adjustment:
The light source is adjusted to the second position by desired guiding trajectory, obtains the second shooting image of Painting Object at this time, and by institute It states the second shooting image and carries out gray proces, the second Painting Object accounting value is calculated;
The second Painting Object accounting value is compared with first preset threshold and the first Painting Object accounting value respectively It is right;
If the second Painting Object accounting value is greater than the first Painting Object accounting value, and the second object accounting value is not Reach first preset threshold, then presses the positive direction of the desired guiding trajectory, the light source is adjusted to the third place;
If the second Painting Object accounting value is greater than the first Painting Object accounting value, and the second object accounting value is Reach first preset threshold, then keeps the light source in the second position, it is constant;
If the second Painting Object accounting value is less than the first Painting Object accounting value, first the light source is moved back to described initial Position is then adjusted the light source to the 4th position by the opposite direction of desired guiding trajectory.
4. light-source brightness as claimed in claim 2 and the adjusting method of position, which is characterized in that described according to first figure The brightness of the light source as described in subject pixel point accounting data point reuse, specifically:
Judge in the first image subject pixel point accounting data, image subject pixel accounting value is greater than the second preset threshold Gray scale interval number, if be more than predetermined number;
If being more than the predetermined number, the brightness for keeping the light source current is constant;
If being no more than the predetermined number, executes following steps and the brightness of the light source is adjusted:
The brightness of the light source is adjusted by preset adjustment direction, wherein the preset adjustment direction includes by institute The preset grade of light source dim is stated, or the light source is lightened into preset grade;
The third for obtaining Painting Object at this time shoots image, and third shooting image is carried out gray proces, then calculates Obtain the second image subject pixel accounting data;
By the second image subject pixel accounting data and the first image subject pixel point accounting data, compared It is right;
If in the second image subject pixel accounting data, image subject pixel accounting value is greater than the second preset threshold The number of gray scale interval is more than the first image subject pixel point accounting data, and is less than the predetermined number, then continues By preset adjustment direction, the brightness of the light source is adjusted;
If in the second image subject pixel accounting data, image subject pixel accounting value is greater than the second preset threshold The number of gray scale interval is more than the first image subject pixel point accounting data, and is more than the predetermined number, then stops adjusting It is whole, keep the present intensity of the light source constant;
If in the second image subject pixel accounting data, image subject pixel accounting value is greater than the second preset threshold The number of gray scale interval is less than the first image subject pixel point accounting data, then presses and the preset adjustment direction Opposite direction is adjusted the brightness of the light source.
5. a kind of light-source brightness and the adjusting method of position characterized by comprising
In preset duration, executing light-source brightness as described in claim 1-4 any one and the position of preset times Adjusting method.
6. the regulating device of a kind of light-source brightness and position, which is characterized in that accounted for including image grayscale processing module, Painting Object Ratio calculation module, image subject pixel accounting data computation module and light source adjusting module;
Wherein, described image gradation processing module is carried out for obtaining the shooting image of Painting Object, and to the shooting image Gray proces obtain gray level image;
The Painting Object accounts for ratio calculation module, for calculating in the gray level image Painting Object main body in entire grayscale image The accounting of picture obtains the first Painting Object accounting value;
Described image subject pixel point accounting data computation module, for Painting Object main body will to be belonged in the gray level image Pixel calculate each default gray scale as image subject pixel, and according to the gray value of each described image subject pixel point Image subject pixel accounting value in section obtains the first image subject pixel accounting data;
The light source adjusting module, for adjusting the light source position according to the first Painting Object accounting value, according to described The brightness of light source described in first image subject pixel accounting data point reuse.
7. a kind of setting of terminal, including processor, memory and storage in the memory and are configured as by described The computer program that device executes is managed, it is to realize such as claim 1-5 any one that the processor, which executes the computer program, The adjusting method of the light-source brightness and position.
8. a kind of computer readable storage medium, which is characterized in that the computer readable storage medium includes the calculating of storage Machine program, wherein the equipment where controlling the computer readable storage medium in computer program operation executes such as Light-source brightness described in any one of claim 1-5 and the adjusting method of position.
CN201910008342.0A 2019-01-04 2019-01-04 Method and device for adjusting brightness and position of light source Active CN109634027B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910008342.0A CN109634027B (en) 2019-01-04 2019-01-04 Method and device for adjusting brightness and position of light source

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910008342.0A CN109634027B (en) 2019-01-04 2019-01-04 Method and device for adjusting brightness and position of light source

Publications (2)

Publication Number Publication Date
CN109634027A true CN109634027A (en) 2019-04-16
CN109634027B CN109634027B (en) 2020-11-10

Family

ID=66057901

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910008342.0A Active CN109634027B (en) 2019-01-04 2019-01-04 Method and device for adjusting brightness and position of light source

Country Status (1)

Country Link
CN (1) CN109634027B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110969193A (en) * 2019-11-15 2020-04-07 常州瑞昇科技有限公司 Fabric image acquisition method and device, computer equipment and storage medium
CN111275630A (en) * 2020-01-07 2020-06-12 中国人民解放军陆军军医大学第二附属医院 Cell image adjusting method and device and electron microscope
CN111712021A (en) * 2020-06-16 2020-09-25 深圳市千百辉照明工程有限公司 Intelligent adjusting method, device and system for lamplight of art gallery
CN112068607A (en) * 2020-09-11 2020-12-11 广州彩熠灯光股份有限公司 Lamp adjusting method, medium and electronic equipment

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040001639A1 (en) * 2002-04-23 2004-01-01 Olympus Optical Co., Ltd. Image combination device
CN101779079A (en) * 2007-06-12 2010-07-14 富士胶片株式会社 Backlight unit and liquid crystal display device
CN101833659A (en) * 2010-05-05 2010-09-15 中国计量学院 Illumination and image processing method as well as light source control device of meter character recognition system
CN101663532B (en) * 2007-04-20 2011-07-13 夏普株式会社 Illumination device and display device using the same
CN104472018A (en) * 2012-05-07 2015-03-25 陈家铭 Light control systems and methods
CN104460208A (en) * 2014-12-31 2015-03-25 合肥鑫晟光电科技有限公司 Light source assembly and imaging device and method
US20150146077A1 (en) * 2013-11-26 2015-05-28 Aptina Imaging Corporation Imaging systems with image pixels having adjustable spectral responses
CN107113379A (en) * 2016-08-09 2017-08-29 深圳市瑞立视多媒体科技有限公司 The brightness adjusting method of infrared light supply moves with device, optics and catches video camera
CN107239134A (en) * 2017-06-06 2017-10-10 广东小天才科技有限公司 The regulation and control method and device of cursor lamp
CN107480589A (en) * 2017-07-07 2017-12-15 广东欧珀移动通信有限公司 Infrared light supply component and electronic installation
CN108204532A (en) * 2016-12-16 2018-06-26 西安思能网络科技有限公司 A kind of intelligent elevated desk lamp
CN108206904A (en) * 2017-12-04 2018-06-26 阿里巴巴集团控股有限公司 Image capture device, eyes image collecting device and method
CN108449549A (en) * 2018-03-19 2018-08-24 浙江国自机器人技术有限公司 A kind of method, apparatus and storage medium adjusting LED light supplement lamp plate brightness
CN108513414A (en) * 2018-03-26 2018-09-07 中国地质大学(武汉) A kind of stage follow spotlight system and method for focus autotracking
CN108810423A (en) * 2018-06-20 2018-11-13 北京优尔博特创新科技有限公司 A kind of lighting angle adjusting method and system based on gradient of image intensity

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040001639A1 (en) * 2002-04-23 2004-01-01 Olympus Optical Co., Ltd. Image combination device
CN101663532B (en) * 2007-04-20 2011-07-13 夏普株式会社 Illumination device and display device using the same
CN101779079A (en) * 2007-06-12 2010-07-14 富士胶片株式会社 Backlight unit and liquid crystal display device
CN101833659A (en) * 2010-05-05 2010-09-15 中国计量学院 Illumination and image processing method as well as light source control device of meter character recognition system
CN104472018A (en) * 2012-05-07 2015-03-25 陈家铭 Light control systems and methods
US20150146077A1 (en) * 2013-11-26 2015-05-28 Aptina Imaging Corporation Imaging systems with image pixels having adjustable spectral responses
CN104460208A (en) * 2014-12-31 2015-03-25 合肥鑫晟光电科技有限公司 Light source assembly and imaging device and method
CN107113379A (en) * 2016-08-09 2017-08-29 深圳市瑞立视多媒体科技有限公司 The brightness adjusting method of infrared light supply moves with device, optics and catches video camera
CN108204532A (en) * 2016-12-16 2018-06-26 西安思能网络科技有限公司 A kind of intelligent elevated desk lamp
CN107239134A (en) * 2017-06-06 2017-10-10 广东小天才科技有限公司 The regulation and control method and device of cursor lamp
CN107480589A (en) * 2017-07-07 2017-12-15 广东欧珀移动通信有限公司 Infrared light supply component and electronic installation
CN108206904A (en) * 2017-12-04 2018-06-26 阿里巴巴集团控股有限公司 Image capture device, eyes image collecting device and method
CN108449549A (en) * 2018-03-19 2018-08-24 浙江国自机器人技术有限公司 A kind of method, apparatus and storage medium adjusting LED light supplement lamp plate brightness
CN108513414A (en) * 2018-03-26 2018-09-07 中国地质大学(武汉) A kind of stage follow spotlight system and method for focus autotracking
CN108810423A (en) * 2018-06-20 2018-11-13 北京优尔博特创新科技有限公司 A kind of lighting angle adjusting method and system based on gradient of image intensity

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110969193A (en) * 2019-11-15 2020-04-07 常州瑞昇科技有限公司 Fabric image acquisition method and device, computer equipment and storage medium
CN110969193B (en) * 2019-11-15 2023-04-18 常州瑞昇科技有限公司 Fabric image acquisition method and device, computer equipment and storage medium
CN111275630A (en) * 2020-01-07 2020-06-12 中国人民解放军陆军军医大学第二附属医院 Cell image adjusting method and device and electron microscope
CN111712021A (en) * 2020-06-16 2020-09-25 深圳市千百辉照明工程有限公司 Intelligent adjusting method, device and system for lamplight of art gallery
CN112068607A (en) * 2020-09-11 2020-12-11 广州彩熠灯光股份有限公司 Lamp adjusting method, medium and electronic equipment
CN112068607B (en) * 2020-09-11 2024-03-29 广州彩熠灯光股份有限公司 Lamp adjusting method, medium and electronic equipment

Also Published As

Publication number Publication date
CN109634027B (en) 2020-11-10

Similar Documents

Publication Publication Date Title
CN109634027A (en) A kind of light-source brightness and the adjusting method and device of position
CN105050247B (en) Light intelligent regulating system and its method based on expression Model Identification
CN105682310B (en) Combined lighting device and method based on image quality control
CN110336954B (en) Automatic light supplementing adjustment method, system and storage medium
DE102018008217A1 (en) Intelligent guide to capturing digital images that match a target image model
CN109491253B (en) Online learning type personalized intelligent home system and control method thereof
CN104363676A (en) LED surgical shadowless lamp system with full-automatic intelligent constant-light control function
CN105453135A (en) Method, system and computer program product for producing a raised relief map from images of an object
CN108574804A (en) A kind of Light Source Compensation system and method for vision robot
CN101873437A (en) Method and device for regulating exposure
CN106331513B (en) The acquisition methods and system of a kind of high-quality skin image
CN115775321B (en) Lighting lamp brightness adjusting method and device, electronic equipment and storage medium
CN208187400U (en) A kind of long measuring device of Fish based on machine vision
CN113939068A (en) Intelligent LED lamp dimming control device and intelligent LED lamp
CN211560059U (en) Slit-lamp microscope light source automatic regulating system
CN108391356A (en) A kind of Intelligent House Light control system
CN108153357B (en) Intelligent management method and system for greenhouse
CN208434048U (en) A kind of Light Source Compensation system for vision robot
CN105657259B (en) A kind of two points of contractings step shifting method camera parameter adjustment method
CN206271048U (en) A kind of novel human-body facial scan imaging system
CN117528857B (en) LED spotlight intelligent configuration method, system and medium based on artificial intelligence
US11960193B2 (en) Backdrop rear-illumination apparatus, an active green screen and a method for dynamic backdrop rear-illumination
CN112218415B (en) Method, device and equipment for determining illumination intensity of light supplement lamp
CN110264962B (en) Intelligent dimming system and method for pointing backlight naked eye 3D display system
CN113824875B (en) Fruit and vegetable shooting method based on modulated light source brightness interval and shooting interval

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant