CN111950462A - Brightness adjusting method and device, electronic equipment and storage medium - Google Patents

Brightness adjusting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111950462A
CN111950462A CN202010812260.4A CN202010812260A CN111950462A CN 111950462 A CN111950462 A CN 111950462A CN 202010812260 A CN202010812260 A CN 202010812260A CN 111950462 A CN111950462 A CN 111950462A
Authority
CN
China
Prior art keywords
image
shape
processed
detected
pupil
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
CN202010812260.4A
Other languages
Chinese (zh)
Other versions
CN111950462B (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.)
Shenzhen Sensetime Technology Co Ltd
Original Assignee
Shenzhen Sensetime Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Sensetime Technology Co Ltd filed Critical Shenzhen Sensetime Technology Co Ltd
Priority to CN202010812260.4A priority Critical patent/CN111950462B/en
Publication of CN111950462A publication Critical patent/CN111950462A/en
Application granted granted Critical
Publication of CN111950462B publication Critical patent/CN111950462B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/166Detection; Localisation; Normalisation using acquisition arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/18Eye characteristics, e.g. of the iris
    • G06V40/19Sensors therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Ophthalmology & Optometry (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

The application discloses a brightness adjusting method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a first image to be processed and a second image to be processed, wherein the first image to be processed and the second image to be processed both comprise pupils to be detected, the acquisition time of the first image to be processed is a first time, the acquisition time of the second image to be processed is a second time, and the first time is earlier than the second time; obtaining a first proportional relation between a first shape of the pupil to be detected at the first time and a second shape of the pupil to be detected at the second time according to the first image to be processed and the second image to be processed; and obtaining a first brightness adjusting instruction according to the first proportional relation, wherein the first brightness adjusting instruction is used for controlling the lighting equipment to adjust the brightness.

Description

Brightness adjusting method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer vision technologies, and in particular, to a brightness adjustment method and apparatus, an electronic device, and a storage medium.
Background
It is well known that the strong or weak ambient brightness causes discomfort to the human eye. In some environments, the brightness of the environment where a person is located can be made appropriate by adjusting the brightness of the lighting device. Therefore, how to adjust the brightness of the lighting device has a very important meaning.
Disclosure of Invention
The application provides a brightness adjusting method and device, an electronic device and a storage medium.
In a first aspect, a brightness adjustment method is provided, the method including:
acquiring a first image to be processed and a second image to be processed, wherein the first image to be processed and the second image to be processed both comprise pupils to be detected, the acquisition time of the first image to be processed is a first time, the acquisition time of the second image to be processed is a second time, and the first time is earlier than the second time;
obtaining a first proportional relation between a first shape of the pupil to be detected at the first time and a second shape of the pupil to be detected at the second time according to the first image to be processed and the second image to be processed;
and obtaining a first brightness adjusting instruction according to the first proportional relation, wherein the first brightness adjusting instruction is used for controlling the lighting equipment to adjust the brightness.
In this aspect, the brightness adjustment device determines the brightness change of the environment where the person is located according to the proportional relationship between the first shape of the pupil to be detected at the first time and the second shape of the pupil to be detected at the second time, so as to determine the brightness change of the environment where the person is located without using the brightness sensor. When the change of the ambient brightness is determined, the brightness adjusting device can further obtain a first brightness adjusting instruction according to the change of the ambient brightness, and further can adjust the brightness of the lighting equipment through the first brightness adjusting instruction.
With reference to any embodiment of the present application, the obtaining a first proportional relationship between a first shape of the pupil to be detected at the first time and a second shape of the pupil to be detected at the second time according to the first image to be processed and the second image to be processed includes:
acquiring a third shape of the pupil to be detected in the first image to be processed, a fourth shape of the pupil to be detected in the second image to be processed, a first reference shape of a reference object in the first image to be processed and a second reference shape of the reference object in the second image to be processed; the reference object has a fixed shape;
obtaining a second proportional relation according to the third shape, the fourth shape, the first reference shape and the second reference shape; the second proportional relation is a proportional relation between the first variation amplitude and the second variation amplitude; the first variation amplitude is the variation amplitude of the third shape and the fourth shape, and the second variation amplitude is the variation amplitude of the first reference shape and the second reference shape;
and obtaining the first proportional relation according to the second proportional relation.
With reference to any embodiment of the present application, obtaining the first proportional relationship according to the second proportional relationship includes:
determining that the first proportional relationship is that the first shape is smaller than the second shape when the second proportional relationship is that the first variation amplitude exceeds the second variation amplitude;
determining that the first proportional relationship is that the first shape is larger than the second shape when the second proportional relationship is that the first variation amplitude does not exceed the second variation amplitude;
determining the first proportional relationship to be that the first shape is equal to the second shape if the second proportional relationship is that the first magnitude of variation is equal to the second magnitude of variation.
With reference to any embodiment of the present application, obtaining a second proportional relationship according to the third shape, the fourth shape, the first reference shape, and the second reference shape includes:
determining a ratio between the first reference shape and the third shape to obtain a first value;
determining a ratio between the second reference shape and the fourth shape to obtain a second value;
determining the second proportional relationship that the first variation amplitude does not exceed the second variation amplitude when the difference between the first value and the second value is smaller than a first threshold value;
determining the second proportional relationship that the first variation amplitude exceeds the second variation amplitude when the difference between the first value and the second value is larger than a second threshold value;
determining the second proportional relationship as the first magnitude of change being equal to the second magnitude of change if the difference between the first value and the second value is not less than the first threshold and not greater than the second threshold.
In combination with any of the embodiments of the present application, the reference object is an eye;
said determining a ratio between said first reference shape and said third shape resulting in a first value comprising:
determining the ratio of the width of the eye in the first image to be processed to the diameter of the pupil to be detected in the first image to be processed to obtain the first value;
said determining a ratio between said second reference shape and said fourth shape to obtain a second value comprises:
and determining the ratio of the width of the eye in the second image to be processed to the diameter of the pupil to be detected in the second image to be processed to obtain the second value.
In combination with any embodiment of the present application, the first brightness adjustment instruction includes one of: a first instruction and a second instruction; obtaining a first brightness adjustment instruction according to the first proportional relation, including:
obtaining a first instruction for controlling the lighting equipment to increase the brightness under the condition that the first proportional relation is that the first shape is smaller than the second shape;
and obtaining a second instruction for controlling the lighting equipment to turn down the brightness under the condition that the first proportional relation is that the first shape is larger than the second shape.
In combination with any embodiment of the present application, the method further comprises:
acquiring a third image to be processed under the condition that the first proportional relation is that the first shape is not equal to the second shape, wherein the acquisition time of the third image to be processed is a third time, and the third time is later than the second time;
obtaining a third proportional relation between the second shape and a fifth shape of the pupil to be detected at a third time according to the second image to be processed and the third image to be processed;
and under the condition that the third proportional relation is that the second shape is not equal to the fifth shape, obtaining a second brightness adjusting instruction according to the third proportional relation until the sizes of the shapes of the pupil to be detected in the two adjacent image acquisition times are the same, and stopping obtaining a new brightness adjusting instruction.
With reference to any embodiment of the present application, the brightness adjustment method is applied to a brightness adjustment device, the first to-be-processed image, the second to-be-processed image, and the third to-be-processed image are acquired by the brightness adjustment device, and the acquisition time interval of the first to-be-processed image, the second to-be-processed image, and the third to-be-processed image is a first duration; the method further comprises the following steps:
under the condition that the real sizes of the pupils to be detected in the n adjacent image acquisition times are the same, the time interval of image acquisition of the brightness adjusting device is increased from a first time length to a second time length.
With reference to any embodiment of the present application, before obtaining the first proportional relationship between the first shape of the pupil to be detected at the first time and the second shape of the pupil to be detected at the second time according to the first image to be processed and the second image to be processed, the method further includes:
performing face detection processing on the first image to be processed and the second image to be processed, determining a first face from the first image to be processed, and determining a second face from the second image to be processed;
and under the condition that the figure corresponding to the first face is determined to be the same as the figure corresponding to the second face through face comparison between the first face and the second face, taking the pupil in the first face as the pupil to be detected, or taking the pupil in the second face as the pupil to be detected.
In a second aspect, there is provided a luminance adjustment apparatus, the apparatus comprising:
the image processing device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first image to be processed and a second image to be processed, the first image to be processed and the second image to be processed both comprise pupils to be detected, the acquisition time of the first image to be processed is a first time, the acquisition time of the second image to be processed is a second time, and the first time is earlier than the second time;
the first processing unit is used for obtaining a first proportional relation between a first shape of the pupil to be detected at the first time and a second shape of the pupil to be detected at the second time according to the first image to be processed and the second image to be processed;
and the second processing unit is used for obtaining a first brightness adjusting instruction according to the first proportional relation, wherein the first brightness adjusting instruction is used for controlling the lighting equipment to adjust the brightness.
With reference to any one of the embodiments of the present application, the first processing unit is configured to:
acquiring a third shape of the pupil to be detected in the first image to be processed, a fourth shape of the pupil to be detected in the second image to be processed, a first reference shape of a reference object in the first image to be processed and a second reference shape of the reference object in the second image to be processed; the reference object has a fixed shape;
obtaining a second proportional relation according to the third shape, the fourth shape, the first reference shape and the second reference shape; the second proportional relation is a proportional relation between the first variation amplitude and the second variation amplitude; the first variation amplitude is the variation amplitude of the third shape and the fourth shape, and the second variation amplitude is the variation amplitude of the first reference shape and the second reference shape;
and obtaining the first proportional relation according to the second proportional relation.
With reference to any one of the embodiments of the present application, the first processing unit is configured to:
determining that the first proportional relationship is that the first shape is smaller than the second shape when the second proportional relationship is that the first variation amplitude exceeds the second variation amplitude;
determining that the first proportional relationship is that the first shape is larger than the second shape when the second proportional relationship is that the first variation amplitude does not exceed the second variation amplitude;
determining the first proportional relationship to be that the first shape is equal to the second shape if the second proportional relationship is that the first magnitude of variation is equal to the second magnitude of variation.
With reference to any one of the embodiments of the present application, the first processing unit is configured to:
determining a ratio between the first reference shape and the third shape to obtain a first value;
determining a ratio between the second reference shape and the fourth shape to obtain a second value;
determining the second proportional relationship that the first variation amplitude does not exceed the second variation amplitude when the difference between the first value and the second value is smaller than a first threshold value;
determining the second proportional relationship that the first variation amplitude exceeds the second variation amplitude when the difference between the first value and the second value is larger than a second threshold value;
determining the second proportional relationship as the first magnitude of change being equal to the second magnitude of change if the difference between the first value and the second value is not less than the first threshold and not greater than the second threshold.
In combination with any of the embodiments of the present application, the reference object is an eye; the first processing unit is configured to:
determining the ratio of the width of the eye in the first image to be processed to the diameter of the pupil to be detected in the first image to be processed to obtain the first value;
and determining the ratio of the width of the eye in the second image to be processed to the diameter of the pupil to be detected in the second image to be processed to obtain the second value.
In combination with any embodiment of the present application, the first brightness adjustment instruction includes one of: a first instruction and a second instruction; the second processing unit is configured to:
obtaining a first instruction for controlling the lighting equipment to increase the brightness under the condition that the first proportional relation is that the first shape is smaller than the second shape;
and obtaining a second instruction for controlling the lighting equipment to turn down the brightness under the condition that the first proportional relation is that the first shape is larger than the second shape.
With reference to any embodiment of the present application, the obtaining unit is further configured to:
acquiring a third image to be processed under the condition that the first proportional relation is that the first shape is not equal to the second shape, wherein the acquisition time of the third image to be processed is a third time, and the third time is later than the second time;
the first processing unit is further configured to obtain a third proportional relationship between the second shape and a fifth shape of the pupil to be detected at the third time according to the second image to be processed and the third image to be processed;
and under the condition that the third proportional relation is that the second shape is not equal to the fifth shape, obtaining a second brightness adjusting instruction according to the third proportional relation until the sizes of the shapes of the pupil to be detected in the two adjacent image acquisition times are the same, and stopping obtaining a new brightness adjusting instruction.
With reference to any embodiment of the present application, the first to-be-processed image, the second to-be-processed image, and the third to-be-processed image are acquired by the brightness adjustment device, and the acquisition time interval between the first to-be-processed image, the second to-be-processed image, and the third to-be-processed image is a first duration; the brightness adjustment device further includes:
and the adjusting unit is used for increasing the time interval of the acquired images of the brightness adjusting device from a first time length to a second time length under the condition that the real sizes of the pupils to be detected in the n adjacent image acquisition times are the same.
In combination with any embodiment of the present application, the brightness adjustment apparatus further includes:
the detection unit is used for carrying out face detection processing on the first image to be processed and the second image to be processed before the first proportional relation between the first shape of the pupil to be detected at the first time and the second shape of the pupil to be detected at the second time is obtained according to the first image to be processed and the second image to be processed, determining a first face from the first image to be processed, and determining a second face from the second image to be processed;
and under the condition that the figure corresponding to the first face is determined to be the same as the figure corresponding to the second face through face comparison between the first face and the second face, taking the pupil in the first face as the pupil to be detected, or taking the pupil in the second face as the pupil to be detected.
In a third aspect, a processor is provided, which is configured to perform the method according to the first aspect and any one of the possible implementations thereof.
In a fourth aspect, an electronic device is provided, comprising: a processor, transmitting means, input means, output means, and a memory for storing computer program code comprising computer instructions, which, when executed by the processor, cause the electronic device to perform the method of the first aspect and any one of its possible implementations.
In a fifth aspect, there is provided a computer-readable storage medium having stored therein a computer program comprising program instructions which, if executed by a processor, cause the processor to perform the method of the first aspect and any one of its possible implementations.
A sixth aspect provides a computer program product comprising a computer program or instructions which, when run on a computer, causes the computer to perform the method of the first aspect and any of its possible implementations.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present application, the drawings required to be used in the embodiments or the background art of the present application will be described below.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic diagram of an image scale provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a brightness adjusting method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a brightness adjustment device according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a hardware structure of a brightness adjusting apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more, "at least two" means two or three and three or more, "and/or" for describing an association relationship of associated objects, meaning that three relationships may exist, for example, "a and/or B" may mean: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" may indicate that the objects associated with each other are in an "or" relationship, meaning any combination of the items, including single item(s) or multiple items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural. The character "/" may also represent a division in a mathematical operation, e.g., a/b-a divided by b; 6/3 ═ 2. At least one of the following "or similar expressions.
Some concepts that will appear below are first defined. In the embodiment of the present application, the object point refers to a point in the real world, and the real size refers to a size in the real world rather than a size in the image.
The object points correspond to pixel points in the image. For example, the table is photographed using a camera to obtain an image a. The table comprises an object point a, a pixel point b in the image A is obtained by imaging the object point a, and the object point a corresponds to the pixel point b.
In the embodiment of the application, the scale of the object at the near position is large in the image, and the scale of the object at the far position is small in the image. In the embodiment of the present application, "far" refers to a distance between a real object corresponding to an object in an image and an imaging device that acquires the image, and "near" refers to a distance between a real object corresponding to an object in an image and an imaging device that acquires the image.
In the image, the scale of the pixel point is positively correlated with the size of the object point corresponding to the pixel point. Specifically, the larger the scale of a pixel point in an image is, the larger the size of an object point corresponding to the pixel point is. For example, the image a includes a pixel point a and a pixel point b, where an object point corresponding to the pixel point a is an object point 1, and an object point corresponding to the pixel point b is an object point 2. If the scale of the pixel point a in the image a is larger than that of the pixel point b in the image a, the size of the object point 1 is larger than that of the object point 2.
In an image, the scale of a location refers to the ratio between the size of the object at that location and the true size of the object. For example, in fig. 1, since the size of the position where the person a is located is larger than that of the position where the person B is located, and the size difference between people is small (i.e., the difference between the real sizes of different people is small), the area of the pixel point region covered by the person a is larger than that of the pixel point region covered by the person B.
It is well known that the strong or weak ambient brightness causes discomfort to the human eye. Therefore, in some environments, people adjust the brightness of the lighting device to make the brightness of the environment where people are located appropriate. In the embodiment of the present application, the appropriate ambient brightness means that human eyes are in a comfortable state under the ambient brightness.
In the current method for adjusting the brightness of the lighting device, the lighting device collects ambient light through a light sensor to determine the ambient brightness, and then adjusts the brightness according to the ambient brightness. However, this method not only requires a light sensor, but also cannot determine whether the adjusted ambient brightness is appropriate.
Based on this, the embodiment of the application provides a brightness adjusting method. The execution main body of the embodiment of the application is a brightness adjusting device. Optionally, the brightness adjusting device may be one of the following: cell-phone, computer, server, panel computer. The embodiments of the present application will be described below with reference to the drawings.
Referring to fig. 2, fig. 2 is a schematic flow chart of a brightness adjusting method according to an embodiment of the present disclosure.
201. And acquiring a first image to be processed and a second image to be processed.
In the embodiment of the application, both the first image to be processed and the second image to be processed include pupils to be detected. The acquisition time of the first image to be processed is a first time, and the acquisition time of the second image to be processed is a second time, wherein the first time is earlier than the second time.
In one implementation of obtaining the first to-be-processed image and the second to-be-processed image, the brightness adjusting device receives the first to-be-processed image and the second to-be-processed image input by a user through the input component. The above-mentioned input assembly includes: keyboard, mouse, touch screen, touch pad, audio input device, etc.
In another implementation manner of acquiring the first to-be-processed image and the second to-be-processed image, the brightness adjusting device receives the first to-be-processed image and the second to-be-processed image sent by the first terminal. Optionally, the first terminal may be any one of the following: cell-phone, computer, panel computer, server, wearable equipment.
In another implementation manner of acquiring the first to-be-processed image and the second to-be-processed image, the brightness adjusting device acquires the first to-be-processed image and the second to-be-processed image through the imaging assembly. Optionally, the imaging component may be a camera.
202. And obtaining a first proportional relation between a first shape of the pupil to be detected at a first time and a second shape of the pupil to be detected at a second time according to the first image to be processed and the second image to be processed.
In an embodiment of the present application, the proportional relationship between the first shape and the second shape includes: and the proportional relation between the real size of the pupil to be detected at the first time and the real size of the pupil to be detected at the second time. For example, the proportional relationship between the first shape and the second shape may be a proportional relationship between a diameter of the pupil to be detected at a first time and a diameter of the pupil to be detected at a second time. For another example, the proportional relationship between the first shape and the second shape may be a proportional relationship between an area of the pupil to be detected at the first time and an area of the pupil to be detected at the second time.
In an embodiment of the present application, the first proportional relationship includes: the ratio between the size of the first shape and the size of the second shape is greater than 1, the ratio between the size of the first shape and the size of the second shape is equal to 1, and the ratio between the size of the first shape and the size of the second shape is less than 1. The ratio of the size of the first shape to the size of the second shape is larger than 1, and the real size of the pupil to be detected at the first time is larger than the real size of the pupil to be detected at the second time; the ratio of the size of the first shape to the size of the second shape is less than 1, which represents that the real size of the pupil to be detected at the first time is smaller than the real size of the pupil to be detected at the second time; the ratio of the size of the first shape to the size of the second shape is equal to 1, which indicates that the real size of the pupil to be detected at the first time is equal to the real size of the pupil to be detected at the second time.
The brightness adjusting device obtains the size of the pupil to be detected in the first image to be processed by carrying out detection processing on the pupil to be detected in the first image to be processed, and obtains the size of the pupil to be detected in the second image to be processed by carrying out detection processing on the pupil to be detected in the second image to be processed. The brightness adjusting device can further obtain the real size of the first time according to the size of the pupil to be detected in the first image to be processed and the scale of the pupil to be detected in the first image to be processed, and obtain the real size of the second time according to the size of the pupil to be detected in the second image to be processed and the scale of the pupil to be detected in the second image to be processed.
In a possible implementation manner, it is assumed that in the first to-be-processed image and the second to-be-processed image, the scale of the image and the ordinate of the image are in a linear positive correlation, that is, the size of the object point corresponding to the pixel point and the ordinate of the pixel point are in a linear positive correlation. The size of the object point corresponding to the pixel point, the size of the pixel point and the vertical coordinate of the pixel point satisfy the following functional relations: w is k × z × t. Wherein w is the size of the object point corresponding to the pixel point, k is a positive number, z is the ordinate of the pixel point, and t is the size of the pixel point.
For example, assume that in the above functional relationship, w is the length of the object point corresponding to the pixel point, k is 2, t is the length of the pixel point, and t is 1. In the case where z is 1, w is 2 × 1 × 1 is 2 cm; in the case of z being 3, w is 2 × 3 × 1 is 6 cm.
The brightness adjusting device can obtain the real size of the pupil to be detected at the first time according to the size of the pupil to be detected in the first image to be processed, the ordinate of the pupil to be detected in the first image to be processed and the functional relation. And the brightness adjusting device can obtain the real size of the pupil to be detected at the second time according to the size of the pupil to be detected in the second image to be processed, the ordinate of the pupil to be detected in the second image to be processed and the functional relation.
For example, the brightness adjustment device determines that the diameter of the pupil to be detected in the first image to be processed is 1 pixel point, and the position of the pupil to be detected in the first image to be processed is (3, 5), that is, the ordinate of the pupil to be detected is 5. In the case where k is 0.3, the brightness adjustment device may determine that the real diameter of the pupil to be detected at the first time is: 0.3 × 5 × 1 ═ 1.5 mm.
It will be appreciated that the factors that determine the value of k and the units that determine the size of the object point resulting from the functional relationship described above include: the method comprises the steps of referencing hardware parameters of an imaging device, and referencing the distance between the imaging device and a shooting object of the imaging device, wherein the imaging device is used for acquiring a first image to be processed and a second image to be processed.
Under the condition that the real size of the pupil to be detected at the first time and the real size of the pupil to be detected at the second time are obtained, the brightness adjusting device can obtain a proportional relation between the first shape and the second shape, namely a first proportional relation.
In the above implementation manner, in the process of obtaining the real size of the pupil to be detected at the first time and the real size of the pupil to be detected at the second time, the brightness adjusting device utilizes the scale of the pupil to be detected in the first image to be processed and the scale of the pupil to be detected in the second image to be processed, so that the precision of the real size of the pupil to be detected at the first time and the precision of the real size of the pupil to be detected at the second time can be improved, and further the precision of the first proportional relation can be improved.
In another possible implementation manner, the brightness adjusting device obtains the real size of the pupil to be detected at the first time according to the depth information of the pupil to be detected in the first image to be processed and the size of the pupil to be detected in the first image to be processed; and obtaining the real size of the pupil to be detected at the second time according to the depth information of the pupil to be detected in the second image to be processed and the size of the pupil to be detected in the second image to be processed. And then, obtaining a proportional relation between the first shape and the second shape, namely a first proportional relation, according to the real size of the pupil to be detected at the first time and the real size of the pupil to be detected at the second time.
203. And obtaining a first brightness adjusting instruction according to the first proportional relation.
Because the size of the pupil to be detected can be changed according to the brightness of the environment where the person is located (specifically, the ambient brightness becomes bright, the size of the pupil to be detected becomes small, the ambient brightness becomes dark, and the size of the pupil to be detected becomes large), the brightness adjusting device can determine the change condition of the brightness of the environment where the person is located according to the first proportional relation.
Specifically, the first proportional relation represents that the real size of the pupil to be detected at the first time is larger than the real size of the pupil to be detected at the second time, that is, the size of the pupil to be detected is smaller, and represents that the brightness of the environment where the person is located is brighter; the first proportional relation represents that the real size of the pupil to be detected at the first time is smaller than the real size of the pupil to be detected at the second time, namely the size of the pupil to be detected is increased and the brightness of the environment where the person is located is indicated to be dark; the first proportional relation represents that the real size of the pupil to be detected at the first time is equal to the real size of the pupil to be detected at the second time, namely the size of the pupil to be detected is unchanged, and the brightness of the environment where the person is located is represented to be unchanged.
Under the condition that the brightness of the environment where the person is located is bright, a first brightness adjusting instruction is used for controlling the lighting equipment to adjust the brightness to be low; under the condition that the brightness of the environment where a person is located is dark, the first brightness adjusting instruction is used for controlling the lighting equipment to increase the brightness; and under the condition that the brightness of the environment where the person is located is not changed, the first brightness adjusting instruction is null, or the first brightness adjusting instruction is used for controlling the lighting equipment to keep the current brightness.
In an embodiment of the present application, the lighting device includes at least one of: light, display screen, electric window curtain. For example, when the lighting device is a motorized window shade and the first brightness adjustment command indicates that the lighting device increases the brightness, the motorized window shade may increase the brightness by controlling the opening and closing of the motorized window shade when receiving the first brightness adjustment command transmitted by the brightness adjustment device.
In one possible implementation, the first brightness adjustment instruction includes one of: a first instruction and a second instruction. And under the condition that the first size relation is that the real size of the pupil to be detected at the first time is smaller than the real size of the pupil to be detected at the second time, the brightness adjusting device generates a first instruction for controlling the lighting equipment to increase the brightness. And under the condition that the first size relation is that the real size of the pupil to be detected at the first time is larger than the real size of the pupil to be detected at the second time, the brightness adjusting device generates a second instruction for controlling the lighting equipment to turn down the brightness.
Optionally, the first brightness adjustment instruction further includes an instruction to the lighting device to turn down or turn up the brightness. Specifically, the first instruction is to instruct the lighting device to adjust the brightness higher than a first reference value candela/square meter (cd/m)2) (ii) a The second instruction is to instruct the lighting device to adjust the brightness higher by a second reference value candela/square meter (cd/m)2)。
The first reference value and the second reference value may be fixed values set by a user, and the first reference value and the second reference value may be the same or different. For example, the first reference value is 5 and the second reference value is 4. Also for example, the first reference value and the second reference value are both 3.
In the embodiment of the application, the brightness adjusting device determines the brightness change of the environment where the person is located according to the proportional relation between the first shape of the pupil to be detected at the first time and the second shape of the pupil to be detected at the second time, so that the brightness change of the environment where the person is located is determined on the premise that the brightness sensor is not used. When the change of the ambient brightness is determined, the brightness adjusting device can further obtain a first brightness adjusting instruction according to the change of the ambient brightness, and further can adjust the brightness of the lighting equipment through the first brightness adjusting instruction.
As an alternative embodiment, the brightness adjusting device performs the following steps in the process of performing step 202:
1. and acquiring a third shape of the pupil to be detected in the first image to be processed, a fourth shape of the pupil to be detected in the second image to be processed, a first reference shape of a reference object in the first image to be processed and a second reference shape of the reference object in the second image to be processed.
In an embodiment of the application, the reference object has a fixed shape. For example, since the shape of the face of zhang san is fixed (i.e., the face length and face width of zhang san are fixed), the face of zhang san may be a reference object; since the shape of the eye of Zhangthree is fixed (i.e., the eye width and eye height of Zhangthree are fixed), the eye of Zhangthree can be used as a reference object; because the shape of the cabinet in the lying room is fixed (namely the length of the cabinet, the width of the cabinet and the height of the cabinet are all fixed), the cabinet in the lying room can be used as a reference object; since the shape of the cup placed on the table is fixed (i.e., the size of the cup is fixed), the cup placed on the table can be used as a reference object.
In a possible implementation manner, the brightness adjusting device performs the detection processing on the first to-be-processed image to obtain a to-be-detected pupil frame including the to-be-detected pupil, and further obtains the size of the third shape according to the size of the to-be-detected pupil frame. For example, when the shape of the pupil frame to be detected is rectangular, and the length of the pupil frame to be detected in the direction of the transverse axis under the pixel coordinate system is 2 pixel points, the brightness adjusting device can further determine that the diameter of the pupil to be detected is 2 pixel points; when the shape of the pupil frame to be detected is circular and the radius of the pupil frame to be detected is 3 pixel points, the brightness adjusting device can further determine that the radius of the pupil to be detected is 3 pixel points.
Similarly, the brightness adjusting device may obtain the size of the fourth shape according to the size of the pupil frame to be detected in the second image to be processed.
In another possible implementation manner, the brightness adjusting device performs detection processing on the first to-be-processed image to obtain the position of the to-be-detected pupil key point in the first to-be-processed image, and further obtains the size of the third shape according to the position of the to-be-detected pupil key point in the first to-be-processed image. For example, the pupil key points to be detected include a first key point and a second key point, the first key point and the second key point are both located at the edge of the pupil to be detected, and a connecting line of the first key point and the second key point passes through the center of the pupil to be detected. And the brightness adjusting device obtains the distance between the first key point and the second key point according to the position of the first key point in the first image to be processed and the position of the second key point in the first image to be processed, and the distance is used as the diameter of the pupil to be detected.
Similarly, the brightness adjusting device may obtain the size of the fourth shape according to the position of the pupil key point to be detected in the second image to be processed.
In a possible implementation manner, the brightness adjusting apparatus obtains an object frame including the reference object by performing detection processing on the first image to be processed, and further obtains a size of the first reference shape of the reference object in the first image to be processed according to the size of the object frame. For example, when the shape of the object frame is rectangular, and the length of the object frame in the longitudinal axis direction in the pixel coordinate system is 12 pixels, the brightness adjustment device may further determine that the length of the reference object in the longitudinal axis direction in the pixel coordinate system is 12 pixels.
Similarly, the brightness adjusting device may obtain a size of a second reference shape of the reference object in the second image to be processed according to the size of the object frame in the second image to be processed.
In another possible implementation manner, the brightness adjusting apparatus performs reference object keypoint detection processing on the first image to be processed to obtain the position of the reference object keypoint in the first image to be processed, and further obtains the size of the first reference shape according to the position of the reference object keypoint in the first image to be processed. For example, the reference subject is the eye and the reference subject keypoints include the outer and inner canthus keypoints. The brightness adjusting device obtains a distance between the outer canthus key point and the inner canthus key point as the width of the eye according to the position of the outer canthus key point in the first image to be processed and the position of the inner canthus key point in the first image to be processed.
Similarly, the brightness adjusting device may obtain the size of the second reference shape according to the position of the detection key point in the second image to be processed.
In one possible implementation, the detection process may be implemented by a convolutional neural network. The image with the labeling information is used as training data to train the convolutional neural network, so that the trained convolutional neural network can complete the detection processing of the image. The labeling information of the image in the training data is the position information of a detection frame (in the case that the detection object is a pupil to be detected, the detection frame is the pupil frame to be detected, and in the case that the detection object is a reference object, the detection frame is the object frame), and the detection frame contains the detection object (the detection object may be a pupil to be detected, and the detection object may also be the reference object).
In another possible implementation, the detection process may be implemented by an object detection algorithm, wherein the object detection algorithm may be one of the following: only one-eye algorithm (you only look once, YOLO), target detection algorithm (DMP), single-image multi-target detection algorithm (SSD), fast-RCNN algorithm, etc. are needed, and the object detection algorithm for realizing the object detection processing is not limited in the present application.
2. And obtaining a second proportional relation according to the third shape, the fourth shape, the first reference shape and the second reference shape.
In the embodiment of the present application, the second proportional relationship is a proportional relationship between the first variation width and the second variation width. The first variation amplitude is the variation amplitude of the third shape and the fourth shape, namely the variation amplitude of the size of the pupil to be detected in the image in the first time period. The second variation amplitude is a variation amplitude of the first reference shape and the second reference shape, that is, a variation amplitude of a size of the reference object in the image in the first time period.
In the embodiment of the present application, a time period between the first time and the second time is referred to as a first time period, that is, a start time of the first time period is a first time, and an end time of the first time period is a second time. The variation amplitude of the size of the pupil to be detected in the image in the first time period is referred to as a first variation amplitude, and the variation amplitude of the size of the reference object in the image in the first time period is referred to as a second variation amplitude.
Specifically, assume that the first variation amplitude is c1The size of the pupil to be detected in the first image to be processed is s1Pupil to be detected in the second image to be processedHas a size of s2Then c is1、s1、s2Satisfies the following formula:
c1=(s2-s1)/s1… formula (1)
For example, the diameter of the pupil to be detected in the first image to be processed is 3 pixel points, and the diameter of the pupil to be detected in the second image to be processed is 4 pixel points, at this time, the first variation width is (4-3)/3 ═ 1/3. The diameter of the pupil to be detected in the first image to be processed is 5 pixel points, and the diameter of the pupil to be detected in the second image to be processed is 3 pixel points, and at this time, the first variation amplitude is (3-5)/5 ═ 2/5.
Assuming that the second variation amplitude is c2The size of the reference object in the first image to be processed is s3The size of the reference object in the second image to be processed is s4Then c is2、s3、s4Satisfies the following formula:
c2=(s4-s3)/s3… formula (2)
For example, the diameter of the reference object in the first image to be processed is 13 pixel points, and the diameter of the reference object in the second image to be processed is 18 pixel points, at this time, the first variation width is (18-13)/13 ═ 5/13. The diameter of the reference object in the first image to be processed is 10 pixel points, and the diameter of the reference object in the second image to be processed is 8 pixel points, and at this time, the first variation amplitude is (8-10)/10 ═ 1/5.
In the embodiment of the present application, the second proportional relationship is a proportional relationship between the first variation width and the second variation width. Specifically, the second proportional relationship includes: the proportion between the first change amplitude and the second change amplitude is larger than 1, the proportion between the first change amplitude and the second change amplitude is equal to 1, and the proportion between the first change amplitude and the second change amplitude is smaller than 1.
The ratio between the first variation amplitude and the second variation amplitude is greater than 1, which indicates that the first variation amplitude is greater than the second variation amplitude, for example, in the case that the first variation amplitude is 2/3 and the second variation amplitude is 1/3, the first variation amplitude is greater than the second variation amplitude; when the first variation width is 1/3 and the second variation width is-1/3, the first variation width is larger than the second variation width.
The ratio between the first variation amplitude and the second variation amplitude is smaller than 1, which indicates that the first variation amplitude is smaller than the second variation amplitude, for example, in the case that the first variation amplitude is 1/3 and the second variation amplitude is 2/3, the first variation amplitude is smaller than the second variation amplitude; in the case where the first variation width is-1/3 and the second variation width is 1/3, the first variation width is smaller than the second variation width.
The ratio between the first variation amplitude and the second variation amplitude is equal to 1, which indicates that the first variation amplitude is equal to the second variation amplitude, for example, in the case that the first variation amplitude is 1/3 and the second variation amplitude is 1/3, the first variation amplitude is equal to the second variation amplitude; in the case where the first variation amplitude is-1/3 and the second variation amplitude is-1/3, the first variation amplitude is equal to the second variation amplitude.
3. And obtaining the first proportional relation according to the second proportional relation.
If the second ratio indicates that the first variation amplitude is equal to the second variation amplitude, the variation amplitude of the real size of the pupil to be detected is equal to the variation amplitude of the real size of the reference object in the first time period. If the second ratio indicates that the first variation amplitude is larger than the second variation amplitude, the variation amplitude of the real size of the pupil to be detected is larger than the variation amplitude of the real size of the reference object in the first time period. If the second ratio indicates that the first variation amplitude is smaller than the second variation amplitude, the variation amplitude of the real size of the pupil to be detected is smaller than the variation amplitude of the real size of the reference object in the first time period.
Because the reference object has a fixed real size, if the change amplitude of the real size of the pupil to be detected in the first time period is equal to the change amplitude of the real size of the reference object, the real size of the pupil to be detected in the first time period is represented to be unchanged; if the change amplitude of the real size of the pupil to be detected in the first time period is larger than the change amplitude of the real size of the reference object, the real size of the pupil to be detected in the first time period is represented to be increased; if the change amplitude of the real size of the pupil to be detected in the first time period is smaller than the change amplitude of the real size of the reference object, the real size of the pupil to be detected in the first time period is represented to be smaller.
Therefore, the brightness adjusting device can obtain the first proportional relation according to the second proportional relation. In a possible implementation manner, under the condition that the second proportional relationship represents that the first variation amplitude exceeds the second variation amplitude, determining that the first proportional relationship represents that the real size of the pupil to be detected at the first time is smaller than the real size of the pupil to be detected at the second time; under the condition that the second proportional relation represents that the first variation amplitude does not exceed the second variation amplitude, determining that the first proportional relation represents that the real size of the pupil to be detected at the first time is larger than the real size of the pupil to be detected at the second time; and under the condition that the second proportional relationship is that the first variation amplitude is equal to the second variation amplitude, determining that the first proportional relationship represents that the real size of the pupil to be detected at the first time is equal to the real size of the pupil to be detected at the second time.
As an alternative embodiment, the brightness adjusting device performs the following steps in the process of performing step 2:
4. determining a ratio between the first reference shape and the third shape to obtain a first value.
For example, assume that the size of the third shape is the diameter of the pupil to be detected in the first image to be processed, and the diameter is a. The reference object is an eye, the size of the first reference shape is a width of the eye, and the width of the eye is b. At this time, the first value is b/a.
5. Determining a ratio between said second reference shape and said fourth shape to obtain a second value.
For example, assume that the size of the fourth shape is the diameter of the pupil to be detected in the second image to be processed, and the diameter is c. The reference object is a face, the size of the second reference shape is a length of the face, and the length is d. At this time, the second value is d/c.
The first value is equal to the second value, and the first variation amplitude is equal to the second variation amplitude; the first value is larger than the second value, and the first change amplitude is larger than the second change amplitude; the first value is smaller than the second value, and the first change amplitude is smaller than the second change amplitude.
And under the condition that the scale of the pupil to be detected in the first image to be processed is different from the scale of the pupil to be detected in the second image to be processed, the difference between the scale of the pupil to be detected in the first image to be processed and the scale of the pupil to be detected in the second image to be processed is called as a first difference. In the case where the scale of the reference object in the first image to be processed and the scale of the reference object in the second image to be processed are different, the difference between the scale of the reference object in the first image to be processed and the scale of the reference object in the second image to be processed is referred to as a second difference.
In the case where the first difference is different from the second difference, the second proportional relationship may not accurately reflect the first proportional relationship. Specifically, if the first difference is different from the second difference, the real size of the pupil to be detected at the first time may not be equal to the real size of the pupil to be detected at the second time when the second proportional relationship indicates that the first variation amplitude is equal to the second variation amplitude.
In order to improve the accuracy of the second proportional relationship and further improve the accuracy of the first proportional relationship, the brightness adjusting device determines that the second proportional relationship represents that the first variation amplitude is equal to the second variation amplitude under the condition that the difference value between the first value and the second value is not smaller than the first threshold and not larger than the second threshold. The first threshold and the second threshold are both real numbers. Optionally, the first threshold is-0.1, and the second threshold is 0.1.
For example, assume that the first value is 1.31, the second value is 1.38, the first threshold value is-0.01, and the second threshold value is 0.01. Since the difference between the first value and the second value is-0.07, which exceeds-0.1 and does not exceed 0.1, the second proportional relationship characterizes the first magnitude of change as being equal to the second magnitude of change. For another example, assume that the first value is 1.41, the second value is 1.38, the first threshold value is-0.01, and the second threshold value is 0.01. Since the difference between the first value and the second value is 0.03, which exceeds-0.1 and does not exceed 0.1, the second proportional relationship characterizes that the first amplitude of variation is equal to the second amplitude of variation.
Correspondingly, in the case that the difference between the first value and the second value is smaller than the first threshold, the brightness adjusting device determines that the second proportional relationship indicates that the first variation amplitude is smaller than the second variation amplitude. For example, assume that the first value is 1.32, the second value is 1.48, the first threshold value is-0.01, and the second threshold value is 0.01. Since the difference between the first value and the second value is-0.16, which is smaller than the first threshold, the second proportional relationship characterizes that the first magnitude of change is smaller than the second magnitude of change.
And under the condition that the difference value of the first value and the second value is larger than a second threshold value, the brightness adjusting device determines that the second proportional relation indicates that the first change amplitude is larger than the second change amplitude. For example, assume that the first value is 1.62, the second value is 1.48, the first threshold value is-0.01, and the second threshold value is 0.01. Since the difference between the first value and the second value is 0.14, which is greater than the second threshold value, the second proportional relationship characterizes that the first magnitude of change is greater than the second magnitude of change.
As an alternative embodiment, the reference object is an eye, and the first ratio is a ratio between a width of the eye in the first image to be processed and a diameter of the pupil to be detected in the first image to be processed. The second ratio is a ratio between the width of the eye in the second image to be processed and the diameter of the pupil to be detected in the second image to be processed. For example, in the first to-be-processed image, the width of the eye is 5 pixels, and the diameter of the pupil is 2 pixels. In the second image to be processed, the width of the eye is 8 pixel points, and the diameter of the pupil is 4 pixel points. In this case, the first value is 5/2 ═ 2.5, and the second value is 8/4 ═ 2.
As an alternative embodiment, the brightness adjusting device further performs the following steps:
6. and acquiring a third image to be processed under the condition that the first proportional relation is that the first shape is not equal to the second shape.
In the embodiment of the application, the acquisition time of the third to-be-processed image is a third time, and the third time is later than the second time.
The first proportional relation is that the first shape is not equal to the second shape, and the real size of the pupil to be detected at the first time is not equal to the real size of the pupil to be detected at the second time. In this case, during the first time period, the brightness of the environment in which the person is located is too dark or too bright, i.e. the lighting device needs to adjust the brightness at the second time. In order to determine whether the brightness of the environment where the person is located is appropriate after the illumination device adjusts the brightness according to the first brightness adjustment instruction, the brightness adjustment device may determine whether the real size of the pupil to be detected changes after the illumination device adjusts the brightness according to the image acquired after the second time, and further determine whether the brightness of the environment where the person is located is appropriate.
Therefore, the brightness adjusting device acquires the third image to be processed under the condition that the first proportional relation is that the first shape is not equal to the second shape.
In one implementation of obtaining the third to-be-processed image, the brightness adjusting device receives the third to-be-processed image input by the user through the input component. The above-mentioned input assembly includes: keyboard, mouse, touch screen, touch pad, audio input device, etc.
In another implementation manner of acquiring the third to-be-processed image, the brightness adjusting device receives the third to-be-processed image sent by the third terminal. Optionally, the third terminal may be any one of: cell-phone, computer, panel computer, server, wearable equipment.
In another implementation manner of acquiring the third to-be-processed image, the brightness adjusting device acquires the third to-be-processed image through the imaging assembly. Optionally, the imaging component may be a camera.
7. And obtaining a third proportional relation between the second shape and a fifth shape of the pupil to be detected at a third time according to the second image to be processed and the third image to be processed.
In the embodiment of the present application, the third proportional relationship includes: the ratio of the size of the second shape to the size of the seventh shape is greater than 1, the ratio of the size of the second shape to the size of the seventh shape is equal to 1, and the ratio of the size of the second shape to the size of the seventh shape is less than 1. The ratio of the size of the second shape to the size of the seventh shape is greater than 1, which indicates that the real size of the pupil to be detected at the second time is larger than the real size of the pupil to be detected at the third time, the real size of the pupil to be detected at the second time is smaller than the real size of the pupil to be detected at the third time, and the real size of the pupil to be detected at the second time is equal to the real size of the pupil to be detected at the third time.
The implementation manner of the brightness adjustment device obtaining the third size relationship according to the second to-be-processed image and the third to-be-processed image is the same as the implementation manner of obtaining the first size relationship according to the first to-be-processed image and the second to-be-processed image in step 202. And will not be described in detail herein.
Specifically, the second image to be processed in step 7 corresponds to the first image to be processed in step 202, the third image to be processed in step 7 corresponds to the second image to be processed in step 202, and the third size relationship in step 7 corresponds to the first size relationship in step 202.
8. And under the condition that the third proportional relation is that the second shape is not equal to the fifth shape, obtaining a second brightness adjusting instruction according to the third proportional relation until the sizes of the shapes of the pupil to be detected in the two adjacent image acquisition times are the same, and stopping obtaining a new brightness adjusting instruction.
The third proportional relation is that the second shape is not equal to the fifth shape, and the real size of the pupil to be detected at the second time is not equal to the real size of the pupil to be detected at the third time, that is, the brightness of the environment where the person is located is still not appropriate, and the brightness of the environment where the person is located still needs to be adjusted. Therefore, when the third proportional relationship is that the second shape is not equal to the fifth shape, the brightness adjusting device obtains the second brightness adjusting instruction according to the third proportional relationship.
The implementation manner of the brightness adjustment device obtaining the second brightness adjustment instruction according to the third proportional relationship is the same as the implementation manner of obtaining the first brightness adjustment instruction according to the first proportional relationship in step 203. And will not be described in detail herein.
Specifically, the third proportional relationship in step 8 corresponds to the first proportional relationship in step 203, and the second brightness adjustment command in step 8 corresponds to the first brightness adjustment command in step 203.
The brightness adjusting device can send a second brightness adjusting instruction to the lighting equipment after obtaining the second brightness adjusting instruction. And the lighting equipment adjusts the brightness according to the second brightness adjusting instruction. The brightness adjusting device determines that the brightness of the environment where the person is located is proper according to the image of which the acquisition time is later than the third time. If the brightness adjusting device is suitable, the brightness adjusting device stops obtaining a new brightness adjusting instruction, namely the lighting device stops adjusting the brightness. If not, the brightness adjusting device obtains a new brightness adjusting instruction based on the method, and stops obtaining the new brightness adjusting instruction until the shapes and the sizes of the pupil to be detected in the two adjacent image acquisition times are the same (namely, the real sizes of the pupil to be detected in the two adjacent image acquisition times are the same).
In the embodiment of the present application, the following example (example 1) can be referred to for two adjacent image acquisition times: the acquisition time of the image a is t1The acquisition time of the image b is t2The acquisition time of the image c is t3. Let t1Earlier than t2,t2Earlier than t3Then, the image a and the image b are two images with adjacent acquisition time, and the image b and the image c are two images with adjacent acquisition time. At this time, two adjacent image acquisition times include: t is t1And t2、t2And t3
The brightness adjusting device can determine whether the real sizes of the pupils to be detected in the two adjacent images are the same or not according to the two adjacent images in the acquisition time. For example, in example 1, the brightness adjusting device may determine that the pupil to be detected is at t according to the image a and the image b1And the pupil to be detected is at t2Is equal. The brightness adjusting device can determine that the pupil to be detected is at t according to the image b and the image c2And the pupil to be detected is at t3Is equal.
The real sizes of the pupils to be detected in the two adjacent image acquisition time are the same, the brightness representing the environment where the person is located is proper, and the illumination setting does not need to continuously adjust the brightness. Therefore, the brightness adjustment device stops obtaining a new brightness adjustment instruction. The real sizes of the pupils to be detected in the two adjacent image acquisition times are different, and the brightness representing the environment where the person is located is not appropriate, namely the illumination device needs to continuously adjust the brightness. Therefore, the brightness adjusting device obtains a new brightness adjusting instruction according to the two images with the latest acquisition time until the brightness of the environment where the person is located is proper.
For example, if the real size of the pupil to be detected at the third time is the same as the real size of the pupil to be detected at the second time, the brightness adjusting device does not obtain a new brightness adjusting instruction after obtaining the first brightness adjusting instruction. And if the real size of the pupil to be detected at the third time is different from the real size of the pupil to be detected at the second time, the brightness adjusting device obtains a second brightness adjusting instruction according to the second image to be processed and the third image to be processed after obtaining the first brightness adjusting instruction.
As an alternative embodiment, the brightness adjusting method described above is applied to a brightness adjusting device. The brightness adjusting device is reloaded with an imaging assembly, the brightness adjusting device acquires a first image to be processed, a second image to be processed and a third image to be processed by using the imaging assembly, and the time interval of image acquisition of the brightness adjusting device is a first duration. That is, the duration between the first time and the second time is the first duration, and the duration between the second time and the third time is the first duration.
On the premise of executing the steps, the brightness adjusting device further executes the following steps: 9. and in the continuous acquisition of the n images, under the condition that the real sizes of the pupils to be detected are the same, increasing the time interval of image acquisition by the brightness adjusting device from the first time length to the second time length.
Because the brightness of the environment may change, in order to keep the brightness of the environment where a person is located appropriate, the lighting device needs to adjust the brightness along with the change of the brightness of the environment. Therefore, the brightness adjusting device needs to continuously acquire images to determine whether the lighting device needs to adjust the brightness.
However, in the case where the brightness of the environment where the person is located is appropriate and stable, the brightness adjustment device may increase the time interval for acquiring the images to reduce the data processing amount. Therefore, if the real sizes of the pupils to be detected in the n adjacent image acquisition times are the same, the brightness adjusting device determines that the brightness of the environment where the person is located is appropriate and stable, and then the time interval for acquiring the images is increased from the first time length to the second time length.
The above n adjacent image acquisition times can be seen in the following example: the image a, the image b, the image c and the image d are acquired by a brightness adjusting device. The acquisition time of the image a is t1The acquisition time of the image b is t2The acquisition time of the image c is t3The acquisition time of the image d is t4. If n is 2, the adjacent image acquisition times include: t is t1And t2,t2And t3,t3And t4(ii) a If n is 3, the adjacent image acquisition times include: t is t1、t2And t3,t2、t3And t4(ii) a If n is 4, the adjacent image acquisition times include: t is t1、t2、t3And t4
As an alternative embodiment, the real size of the pupil to be detected is the real diameter of the pupil to be detected. The size of the pupil to be detected in the image is the diameter of the pupil to be detected in the image, for example, the size of the pupil to be detected in the first image to be processed is the diameter of the pupil to be detected in the first image to be processed, the size of the pupil to be detected in the second image to be processed is the diameter of the pupil to be detected in the second image to be processed, and the size of the pupil to be detected in the third image to be processed is the diameter of the pupil to be detected in the third image to be processed.
The reference object is an eye, and the true size of the reference object is the true width of the eye. The size of the reference object in the image is the width of the eye in the image, for example, the size of the eye in the first image to be processed is the diameter of the eye in the first image to be processed, the size of the eye in the second image to be processed is the diameter of the eye in the second image to be processed, and the size of the eye in the third image to be processed is the diameter of the eye in the third image to be processed.
As an alternative embodiment, before executing step 202, the brightness adjusting device further executes the following steps:
10. and performing face detection processing on the first image to be processed and the second image to be processed, determining a first face from the first image to be processed, and determining a second face from the second image to be processed.
In this step, the number of faces in the first image to be processed and the second image to be processed is not less than 1. The brightness adjusting device can determine at least one first detected face from the first image to be processed by carrying out face detection processing on the first image to be processed. The brightness adjusting device can determine at least one second detected face from the second image to be processed by carrying out face detection processing on the second image to be processed. The first face is one face of at least one first detected face. The second face is one of the at least one second detected face.
11. And under the condition that the figure corresponding to the first face is determined to be the same as the figure corresponding to the second face through face comparison between the first face and the second face, taking the pupil in the first face as the pupil to be detected, or taking the pupil in the second face as the pupil to be detected.
The brightness adjusting device can determine whether the figure corresponding to the first face and the figure corresponding to the second face are the same person or not by comparing the first face with the second face. Under the condition that the person corresponding to the first face and the person corresponding to the second face are the same person, the pupil in the first face is used as the pupil to be detected by the brightness adjusting device, and the pupil in the second face is used as the pupil to be detected by the brightness adjusting device.
Since the pupil sizes of different persons are different, the accuracy of the first brightness adjustment instruction can be improved by performing step 11. Alternatively, in the case where it is determined whether the person corresponding to the first face is different from the person corresponding to the second face, the luminance adjustment device does not perform step 202.
Based on the technical scheme provided by the embodiment of the application, the embodiment of the application also provides a possible application scene. Along with the increasing powerful functions of the mobile phone, the application of the mobile phone is wider and wider, and the frequency of using the mobile phone by people is higher and higher. When people use the mobile phone in daily life, the brightness of the use environment is easy to change, and further discomfort is caused when people use the mobile phone. For example, due to strong outdoor light, a user can display the brightness of a mobile phone screen when using the mobile phone outdoors. When the user goes from the outdoor to the indoor, the user feels uncomfortable when watching the mobile phone screen due to weak indoor light intensity.
By using the technical scheme provided by the embodiment of the application, the display brightness of the screen can be adjusted according to the brightness of the environment where the user is located when the user uses the mobile phone. Specifically, the mobile phone uses a camera (such as a front camera) to acquire an image including the pupil of the user, and determines whether the brightness of the environment where the user is located is appropriate based on the above-mentioned technical scheme, so as to determine whether the brightness of the screen needs to be adjusted, thereby reducing the discomfort of the user when the user watches the screen of the mobile phone.
Optionally, before determining whether the screen brightness needs to be adjusted by using the foregoing technical solution, the mobile phone may set the initial display brightness of the mobile phone screen according to the environment where the user is located. For example, in the case that the mobile phone determines that the user is in a library, the lighting standard value in the library may be determined to be 300 lux according to the architectural lighting design standard (GB50034-2013), and then the initial display brightness of the screen may be determined according to the standard value. And under the condition of receiving an instruction of waking up the screen, displaying by the mobile phone at the initial display brightness.
Because the mobile phone is mostly provided with the camera, the mobile phone can realize the adjustment of the screen brightness on the premise of not loading the light sensor by using the technical scheme. In the foregoing technical solution, the basis for determining whether the screen brightness adjustment is appropriate is whether the real size of the pupil of the user changes, and the mobile phone adjusts the screen brightness by using the foregoing technical solution, so that the brightness of the environment where the user is located is appropriate.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
The method of the embodiments of the present application is set forth above in detail and the apparatus of the embodiments of the present application is provided below.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a brightness adjusting device according to an embodiment of the present disclosure, where the brightness adjusting device includes: an acquisition unit 11, a first processing unit 12, a second processing unit 13, an adjustment unit 14, a detection unit 15, wherein:
the image processing device comprises an acquiring unit 11, a processing unit and a processing unit, wherein the acquiring unit is used for acquiring a first image to be processed and a second image to be processed, the first image to be processed and the second image to be processed both comprise pupils to be detected, the acquiring time of the first image to be processed is a first time, the acquiring time of the second image to be processed is a second time, and the first time is earlier than the second time;
the first processing unit 12 is configured to obtain a first proportional relationship between a first shape of the pupil to be detected at the first time and a second shape of the pupil to be detected at the second time according to the first image to be processed and the second image to be processed;
and the second processing unit 13 is configured to obtain a first brightness adjustment instruction according to the first proportional relationship, where the first brightness adjustment instruction is used to control the lighting device to adjust brightness.
In combination with any embodiment of the present application, the first processing unit 12 is configured to:
acquiring a third shape of the pupil to be detected in the first image to be processed, a fourth shape of the pupil to be detected in the second image to be processed, a first reference shape of a reference object in the first image to be processed and a second reference shape of the reference object in the second image to be processed; the reference object has a fixed shape;
obtaining a second proportional relation according to the third shape, the fourth shape, the first reference shape and the second reference shape; the second proportional relation is a proportional relation between the first variation amplitude and the second variation amplitude; the first variation amplitude is the variation amplitude of the third shape and the fourth shape, and the second variation amplitude is the variation amplitude of the first reference shape and the second reference shape;
and obtaining the first proportional relation according to the second proportional relation.
In combination with any embodiment of the present application, the first processing unit 12 is configured to:
determining that the first proportional relationship is that the first shape is smaller than the second shape when the second proportional relationship is that the first variation amplitude exceeds the second variation amplitude;
determining that the first proportional relationship is that the first shape is larger than the second shape when the second proportional relationship is that the first variation amplitude does not exceed the second variation amplitude;
determining the first proportional relationship to be that the first shape is equal to the second shape if the second proportional relationship is that the first magnitude of variation is equal to the second magnitude of variation.
In combination with any embodiment of the present application, the first processing unit 12 is configured to:
determining a ratio between the first reference shape and the third shape to obtain a first value;
determining a ratio between the second reference shape and the fourth shape to obtain a second value;
determining the second proportional relationship that the first variation amplitude does not exceed the second variation amplitude when the difference between the first value and the second value is smaller than a first threshold value;
determining the second proportional relationship that the first variation amplitude exceeds the second variation amplitude when the difference between the first value and the second value is larger than a second threshold value;
determining the second proportional relationship as the first magnitude of change being equal to the second magnitude of change if the difference between the first value and the second value is not less than the first threshold and not greater than the second threshold.
In combination with any of the embodiments of the present application, the reference object is an eye; the first processing unit 12 is configured to:
determining the ratio of the width of the eye in the first image to be processed to the diameter of the pupil to be detected in the first image to be processed to obtain the first value;
and determining the ratio of the width of the eye in the second image to be processed to the diameter of the pupil to be detected in the second image to be processed to obtain the second value.
In combination with any embodiment of the present application, the first brightness adjustment instruction includes one of: a first instruction and a second instruction; the second processing unit 13 is configured to:
obtaining a first instruction for controlling the lighting equipment to increase the brightness under the condition that the first proportional relation is that the first shape is smaller than the second shape;
and obtaining a second instruction for controlling the lighting equipment to turn down the brightness under the condition that the first proportional relation is that the first shape is larger than the second shape.
With reference to any embodiment of the present application, the obtaining unit 11 is further configured to:
acquiring a third image to be processed under the condition that the first proportional relation is that the first shape is not equal to the second shape, wherein the acquisition time of the third image to be processed is a third time, and the third time is later than the second time;
the first processing unit is further configured to obtain a third proportional relationship between the second shape and a fifth shape of the pupil to be detected at the third time according to the second image to be processed and the third image to be processed;
and under the condition that the third proportional relation is that the second shape is not equal to the fifth shape, obtaining a second brightness adjusting instruction according to the third proportional relation until the sizes of the shapes of the pupil to be detected in the two adjacent image acquisition times are the same, and stopping obtaining a new brightness adjusting instruction.
With reference to any embodiment of the present application, the first to-be-processed image, the second to-be-processed image, and the third to-be-processed image are acquired by the brightness adjustment device, and the acquisition time interval between the first to-be-processed image, the second to-be-processed image, and the third to-be-processed image is a first duration; the luminance adjustment device 1 further includes:
the adjusting unit 14 is configured to increase the time interval of image acquisition of the brightness adjusting device from a first time length to a second time length when the real sizes of the n adjacent image acquisition times of the pupil to be detected are the same.
In combination with any embodiment of the present application, the brightness adjustment device 1 further includes:
the detecting unit 15 is configured to, before obtaining a first proportional relationship between a first shape of the pupil to be detected at the first time and a second shape of the pupil to be detected at the second time according to the first image to be processed and the second image to be processed, perform face detection processing on the first image to be processed and the second image to be processed, determine a first face from the first image to be processed, and determine a second face from the second image to be processed;
and under the condition that the figure corresponding to the first face is determined to be the same as the figure corresponding to the second face through face comparison between the first face and the second face, taking the pupil in the first face as the pupil to be detected, or taking the pupil in the second face as the pupil to be detected.
In this embodiment, the brightness adjustment device determines the brightness change of the environment where the person is located according to the proportional relationship between the first shape of the pupil to be detected at the first time and the second shape of the pupil to be detected at the second time, so as to determine the brightness change of the environment where the person is located without using a brightness sensor. When the change of the ambient brightness is determined, the brightness adjusting device can further obtain a first brightness adjusting instruction according to the change of the ambient brightness, and further can adjust the brightness of the lighting equipment through the first brightness adjusting instruction.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present application may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
Fig. 4 is a schematic diagram of a hardware structure of a brightness adjusting apparatus according to an embodiment of the present disclosure. The brightness adjustment device 2 comprises a processor 21, a memory 22, an input device 23, and an output device 24. The processor 21, the memory 22, the input device 23 and the output device 24 are coupled by a connector, which includes various interfaces, transmission lines or buses, etc., and the embodiment of the present application is not limited thereto. It should be appreciated that in various embodiments of the present application, coupled refers to being interconnected in a particular manner, including being directly connected or indirectly connected through other devices, such as through various interfaces, transmission lines, buses, and the like.
The processor 21 may be one or more Graphics Processing Units (GPUs), and in the case that the processor 21 is one GPU, the GPU may be a single-core GPU or a multi-core GPU. Alternatively, the processor 21 may be a processor group composed of a plurality of GPUs, and the plurality of processors are coupled to each other through one or more buses. Alternatively, the processor may be other types of processors, and the like, and the embodiments of the present application are not limited.
Memory 22 may be used to store computer program instructions, as well as various types of computer program code for executing the program code of aspects of the present application. Alternatively, the memory includes, but is not limited to, Random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or compact disc read-only memory (CD-ROM), which is used for associated instructions and data.
The input means 23 are for inputting data and/or signals and the output means 24 are for outputting data and/or signals. The input device 23 and the output device 24 may be separate devices or may be an integral device.
It is understood that, in the embodiment of the present application, the memory 22 may be used to store not only the relevant instructions, but also relevant data, for example, the memory 22 may be used to store the first to-be-processed image and the second to-be-processed image obtained through the input device 23, or the memory 22 may be used to store the first brightness adjustment instruction obtained by the processor 21, and the like, and the embodiment of the present application is not limited to the data specifically stored in the memory.
It will be appreciated that fig. 4 only shows a simplified design of the brightness adjustment means. In practical applications, the brightness adjusting apparatus may further include other necessary components, including but not limited to any number of input/output devices, processors, memories, etc., and all brightness adjusting apparatuses that can implement the embodiments of the present application are within the scope of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It is also clear to those skilled in the art that the descriptions of the various embodiments of the present application have different emphasis, and for convenience and brevity of description, the same or similar parts may not be repeated in different embodiments, so that the parts that are not described or not described in detail in a certain embodiment may refer to the descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be actually separate, and parts displayed as units may or may not be actual units, that is, may be located in one place, or may also be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone, or two or more units are integrated into one unit.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)), or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
One of ordinary skill in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the above method embodiments. And the aforementioned storage medium includes: various media that can store program codes, such as a read-only memory (ROM) or a Random Access Memory (RAM), a magnetic disk, or an optical disk.

Claims (10)

1. A method of adjusting brightness, the method comprising:
acquiring a first image to be processed and a second image to be processed, wherein the first image to be processed and the second image to be processed both comprise pupils to be detected, the acquisition time of the first image to be processed is a first time, the acquisition time of the second image to be processed is a second time, and the first time is earlier than the second time;
obtaining a first proportional relation between a first shape of the pupil to be detected at the first time and a second shape of the pupil to be detected at the second time according to the first image to be processed and the second image to be processed;
and obtaining a first brightness adjusting instruction according to the first proportional relation, wherein the first brightness adjusting instruction is used for controlling the lighting equipment to adjust the brightness.
2. The method according to claim 1, wherein obtaining a first proportional relationship between a first shape of the pupil to be detected at the first time and a second shape of the pupil to be detected at the second time according to the first image to be processed and the second image to be processed comprises:
acquiring a third shape of the pupil to be detected in the first image to be processed, a fourth shape of the pupil to be detected in the second image to be processed, a first reference shape of a reference object in the first image to be processed and a second reference shape of the reference object in the second image to be processed; the reference object has a fixed shape;
obtaining a second proportional relation according to the third shape, the fourth shape, the first reference shape and the second reference shape; the second proportional relation is a proportional relation between the first variation amplitude and the second variation amplitude; the first variation amplitude is the variation amplitude of the third shape and the fourth shape, and the second variation amplitude is the variation amplitude of the first reference shape and the second reference shape;
and obtaining the first proportional relation according to the second proportional relation.
3. The method of claim 2, wherein obtaining the first proportional relationship according to the second proportional relationship comprises:
determining that the first proportional relationship is that the first shape is smaller than the second shape when the second proportional relationship is that the first variation amplitude exceeds the second variation amplitude;
determining that the first proportional relationship is that the first shape is larger than the second shape when the second proportional relationship is that the first variation amplitude does not exceed the second variation amplitude;
determining the first proportional relationship to be that the first shape is equal to the second shape if the second proportional relationship is that the first magnitude of variation is equal to the second magnitude of variation.
4. The method of claim 2 or 3, wherein said deriving a second proportional relationship from said third shape, said fourth shape, said first reference shape, and said second reference shape comprises:
determining a ratio between the first reference shape and the third shape to obtain a first value;
determining a ratio between the second reference shape and the fourth shape to obtain a second value;
determining the second proportional relationship that the first variation amplitude does not exceed the second variation amplitude when the difference between the first value and the second value is smaller than a first threshold value;
determining the second proportional relationship that the first variation amplitude exceeds the second variation amplitude when the difference between the first value and the second value is larger than a second threshold value;
determining the second proportional relationship as the first magnitude of change being equal to the second magnitude of change if the difference between the first value and the second value is not less than the first threshold and not greater than the second threshold.
5. The method of claim 4, wherein the reference object is an eye;
said determining a ratio between said first reference shape and said third shape resulting in a first value comprising:
determining the ratio of the width of the eye in the first image to be processed to the diameter of the pupil to be detected in the first image to be processed to obtain the first value;
said determining a ratio between said second reference shape and said fourth shape to obtain a second value comprises:
and determining the ratio of the width of the eye in the second image to be processed to the diameter of the pupil to be detected in the second image to be processed to obtain the second value.
6. The method according to any one of claims 1 to 5, wherein the first brightness adjustment instruction comprises one of: a first instruction and a second instruction; obtaining a first brightness adjustment instruction according to the first proportional relation, including:
obtaining a first instruction for controlling the lighting equipment to increase the brightness under the condition that the first proportional relation is that the first shape is smaller than the second shape;
and obtaining a second instruction for controlling the lighting equipment to turn down the brightness under the condition that the first proportional relation is that the first shape is larger than the second shape.
7. The method according to any one of claims 1 to 6, further comprising:
acquiring a third image to be processed under the condition that the first proportional relation is that the first shape is not equal to the second shape, wherein the acquisition time of the third image to be processed is a third time, and the third time is later than the second time;
obtaining a third proportional relation between the second shape and a fifth shape of the pupil to be detected at a third time according to the second image to be processed and the third image to be processed;
and under the condition that the third proportional relation is that the second shape is not equal to the fifth shape, obtaining a second brightness adjusting instruction according to the third proportional relation until the sizes of the shapes of the pupil to be detected in the two adjacent image acquisition times are the same, and stopping obtaining a new brightness adjusting instruction.
8. A luminance adjustment apparatus, characterized in that the apparatus comprises:
the image processing device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first image to be processed and a second image to be processed, the first image to be processed and the second image to be processed both comprise pupils to be detected, the acquisition time of the first image to be processed is a first time, the acquisition time of the second image to be processed is a second time, and the first time is earlier than the second time;
the first processing unit is used for obtaining a first proportional relation between a first shape of the pupil to be detected at the first time and a second shape of the pupil to be detected at the second time according to the first image to be processed and the second image to be processed;
and the second processing unit is used for obtaining a first brightness adjusting instruction according to the first proportional relation, wherein the first brightness adjusting instruction is used for controlling the lighting equipment to adjust the brightness.
9. An electronic device, comprising: a processor and a memory for storing computer program code comprising computer instructions which, if executed by the processor, the electronic device performs the method of any of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored, which computer program comprises program instructions which, if executed by a processor, cause the processor to carry out the method of any one of claims 1 to 7.
CN202010812260.4A 2020-08-13 2020-08-13 Brightness adjusting method and device, electronic equipment and storage medium Active CN111950462B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010812260.4A CN111950462B (en) 2020-08-13 2020-08-13 Brightness adjusting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010812260.4A CN111950462B (en) 2020-08-13 2020-08-13 Brightness adjusting method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111950462A true CN111950462A (en) 2020-11-17
CN111950462B CN111950462B (en) 2022-03-25

Family

ID=73341934

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010812260.4A Active CN111950462B (en) 2020-08-13 2020-08-13 Brightness adjusting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111950462B (en)

Citations (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103198484A (en) * 2013-04-07 2013-07-10 山东师范大学 Iris image segmentation algorithm based on nonlinear dimension space
CN103218990A (en) * 2013-03-29 2013-07-24 深圳市金立通信设备有限公司 Method for adjusting screen brightness and terminal
CN103327172A (en) * 2013-04-28 2013-09-25 华为终端有限公司 Method and terminal for regulating terminal screen luminance
CN103680465A (en) * 2013-11-18 2014-03-26 天津三星通信技术研究有限公司 Visual fatigue detection and mitigation method
CN103748598A (en) * 2011-05-20 2014-04-23 爱福露恩斯公司 Systems and methods for identifying gaze tracking scene reference locations
CN104333709A (en) * 2014-12-01 2015-02-04 京东方科技集团股份有限公司 Method, device and electronic equipment for controlling flash lamp
CN105704886A (en) * 2014-12-16 2016-06-22 现代自动车株式会社 Vehicle lighting control system using wearable glasses and method for the same
US20160231573A1 (en) * 2015-02-10 2016-08-11 Daqri, Llc Dynamic lighting for head mounted device
CN106195656A (en) * 2016-07-13 2016-12-07 河海大学常州校区 According to human eye state regulation colour temperature and the operation shadowless lamp of brightness
US20170206860A1 (en) * 2015-08-06 2017-07-20 Mediatek Inc. Method For Adjusting Display Of Electronic Device And Electronic Device Capable Of Adjusting Display
CN108848268A (en) * 2018-06-27 2018-11-20 努比亚技术有限公司 Intelligent adjusting method, mobile terminal and the readable storage medium storing program for executing of screen intensity
CN108962187A (en) * 2018-06-28 2018-12-07 维沃移动通信有限公司 Screen luminance adjustment method and mobile terminal
CN108989570A (en) * 2018-08-14 2018-12-11 奇酷互联网络科技(深圳)有限公司 Mobile terminal and the method, apparatus for determining screen starting brightness value
CN109633907A (en) * 2019-01-09 2019-04-16 福建天晴数码有限公司 The method of simple eye AR glasses automatic brightness adjustment, storage medium
CN109658904A (en) * 2019-02-20 2019-04-19 北京七鑫易维信息技术有限公司 A kind of screen luminance adjustment method and device
CN109725423A (en) * 2019-01-09 2019-05-07 福建天晴数码有限公司 The method of simple eye AR glasses automatic brightness adjustment, storage medium
CN110187855A (en) * 2019-05-28 2019-08-30 武汉市天蝎科技有限公司 The intelligent adjusting method for avoiding hologram block vision of near-eye display device
CN110251074A (en) * 2019-06-19 2019-09-20 重庆市中医院 Multifunctional medical detection system
CN110267422A (en) * 2019-06-27 2019-09-20 温州市消防机电设备实业公司 A kind of room lighting regulating system
CN110275612A (en) * 2019-05-28 2019-09-24 Oppo广东移动通信有限公司 Brightness adjusting method, device, electronic equipment and storage medium
CN110348936A (en) * 2019-05-23 2019-10-18 珠海随变科技有限公司 A kind of glasses recommended method, device, system and storage medium
CN110786823A (en) * 2019-12-12 2020-02-14 新疆医科大学第三附属医院 Infrared pupil identification measurement method and device, storage medium and terminal equipment
CN110890078A (en) * 2019-10-16 2020-03-17 东南大学 Method for automatically adjusting brightness of display screen based on pupil size

Patent Citations (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103748598A (en) * 2011-05-20 2014-04-23 爱福露恩斯公司 Systems and methods for identifying gaze tracking scene reference locations
CN103218990A (en) * 2013-03-29 2013-07-24 深圳市金立通信设备有限公司 Method for adjusting screen brightness and terminal
CN103198484A (en) * 2013-04-07 2013-07-10 山东师范大学 Iris image segmentation algorithm based on nonlinear dimension space
CN103327172A (en) * 2013-04-28 2013-09-25 华为终端有限公司 Method and terminal for regulating terminal screen luminance
CN103680465A (en) * 2013-11-18 2014-03-26 天津三星通信技术研究有限公司 Visual fatigue detection and mitigation method
CN104333709A (en) * 2014-12-01 2015-02-04 京东方科技集团股份有限公司 Method, device and electronic equipment for controlling flash lamp
CN105704886A (en) * 2014-12-16 2016-06-22 现代自动车株式会社 Vehicle lighting control system using wearable glasses and method for the same
US20160231573A1 (en) * 2015-02-10 2016-08-11 Daqri, Llc Dynamic lighting for head mounted device
US20170206860A1 (en) * 2015-08-06 2017-07-20 Mediatek Inc. Method For Adjusting Display Of Electronic Device And Electronic Device Capable Of Adjusting Display
CN106195656A (en) * 2016-07-13 2016-12-07 河海大学常州校区 According to human eye state regulation colour temperature and the operation shadowless lamp of brightness
CN108848268A (en) * 2018-06-27 2018-11-20 努比亚技术有限公司 Intelligent adjusting method, mobile terminal and the readable storage medium storing program for executing of screen intensity
CN108962187A (en) * 2018-06-28 2018-12-07 维沃移动通信有限公司 Screen luminance adjustment method and mobile terminal
CN108989570A (en) * 2018-08-14 2018-12-11 奇酷互联网络科技(深圳)有限公司 Mobile terminal and the method, apparatus for determining screen starting brightness value
CN109633907A (en) * 2019-01-09 2019-04-16 福建天晴数码有限公司 The method of simple eye AR glasses automatic brightness adjustment, storage medium
CN109725423A (en) * 2019-01-09 2019-05-07 福建天晴数码有限公司 The method of simple eye AR glasses automatic brightness adjustment, storage medium
CN109658904A (en) * 2019-02-20 2019-04-19 北京七鑫易维信息技术有限公司 A kind of screen luminance adjustment method and device
CN110348936A (en) * 2019-05-23 2019-10-18 珠海随变科技有限公司 A kind of glasses recommended method, device, system and storage medium
CN110187855A (en) * 2019-05-28 2019-08-30 武汉市天蝎科技有限公司 The intelligent adjusting method for avoiding hologram block vision of near-eye display device
CN110275612A (en) * 2019-05-28 2019-09-24 Oppo广东移动通信有限公司 Brightness adjusting method, device, electronic equipment and storage medium
CN110251074A (en) * 2019-06-19 2019-09-20 重庆市中医院 Multifunctional medical detection system
CN110267422A (en) * 2019-06-27 2019-09-20 温州市消防机电设备实业公司 A kind of room lighting regulating system
CN110890078A (en) * 2019-10-16 2020-03-17 东南大学 Method for automatically adjusting brightness of display screen based on pupil size
CN110786823A (en) * 2019-12-12 2020-02-14 新疆医科大学第三附属医院 Infrared pupil identification measurement method and device, storage medium and terminal equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
DANIELE ZAVAGNO 等: "The Eye Pupil’s Response to Static and Dynamic Illusions of Luminosity and Darkness", 《I-PERCEPTION》 *
潘国兵 等: "隧道洞口段驾驶人眼滞后特性研究", 《隧道建设》 *
胡英奎 等: "驾车接近隧道过程中驾驶员瞳孔大小变化规律", 《土木建筑与环境工程》 *

Also Published As

Publication number Publication date
CN111950462B (en) 2022-03-25

Similar Documents

Publication Publication Date Title
CN108538265B (en) Display brightness adjusting method and device of liquid crystal display screen
KR102507567B1 (en) Electronic apparatus for processing image and mehotd for controlling thereof
US10783835B2 (en) Automatic control of display brightness
KR102649197B1 (en) Electronic apparatus for displaying graphic object and computer readable recording medium
KR20180096434A (en) Method for displaying virtual image, storage medium and electronic device therefor
US9495004B2 (en) Display device adjustment by control device
CN108154864A (en) Display screen processing method, the first electronic equipment and the second electronic equipment
CN110211549A (en) A kind of screen brightness regulation method, device, terminal and storage medium
CN109472738B (en) Image illumination correction method and device, electronic equipment and storage medium
KR20160055534A (en) Method for content adaptation based on ambient environment in electronic device and the electronic device thereof
WO2020052555A1 (en) Method for modulating brightness-grayscale curve of display device, and electronic device
CN109144250B (en) Position adjusting method, device, equipment and storage medium
KR20170097884A (en) Method for processing image and electronic device thereof
CN110853128B (en) Virtual object display method and device, computer equipment and storage medium
KR20180109217A (en) Method for enhancing face image and electronic device for the same
CN109688325A (en) A kind of image display method and terminal device
CN112269559A (en) Volume adjustment method and device, electronic equipment and storage medium
CN114038370B (en) Display parameter adjustment method and device, storage medium and display equipment
CN111901459A (en) Color temperature adjusting method, device, terminal and storage medium
CN113674718B (en) Display brightness adjusting method, device and storage medium
US20210211566A1 (en) Image processing method and apparatus, and electronic device and storage medium
CN113342229A (en) Method and device for adjusting font size, terminal equipment and computer readable storage medium
CN111950462B (en) Brightness adjusting method and device, electronic equipment and storage medium
CN111179860A (en) Backlight mode adjusting method of electronic equipment, electronic equipment and device
CN112333900B (en) Intelligent light supplementing and shadow eliminating method and system

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