CN114333073A - Intelligent table lamp auxiliary adjusting method and system based on visual perception - Google Patents

Intelligent table lamp auxiliary adjusting method and system based on visual perception Download PDF

Info

Publication number
CN114333073A
CN114333073A CN202210229516.8A CN202210229516A CN114333073A CN 114333073 A CN114333073 A CN 114333073A CN 202210229516 A CN202210229516 A CN 202210229516A CN 114333073 A CN114333073 A CN 114333073A
Authority
CN
China
Prior art keywords
head
desk lamp
value
shadow
acquiring
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
CN202210229516.8A
Other languages
Chinese (zh)
Other versions
CN114333073B (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.)
Qidong Jingyao Photoelectric Technology Co ltd
Original Assignee
Qidong Jingyao Photoelectric 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 Qidong Jingyao Photoelectric Technology Co ltd filed Critical Qidong Jingyao Photoelectric Technology Co ltd
Priority to CN202210229516.8A priority Critical patent/CN114333073B/en
Publication of CN114333073A publication Critical patent/CN114333073A/en
Application granted granted Critical
Publication of CN114333073B publication Critical patent/CN114333073B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Abstract

The invention discloses an intelligent desk lamp auxiliary adjusting method and system based on visual perception. The method comprises the following steps: acquiring a shadow image projected on a background on the opposite side of the desk lamp when a user uses the desk lamp; acquiring parameters representing the width of the head shadow contour according to the head contour fitting curve in the shadow image; segmenting the head outline in the shadow image until the gradient of head outline pixel points in each segmented outline section meets a preset condition, and obtaining the number of segmentation blocks of the head shadow outline; acquiring a user sitting posture assessment value; and inputting parameters representing the width of the head shadow outline, the number of head shadow outline segmentation blocks and the user sitting posture evaluation value into an intelligent desk lamp auxiliary adjusting network to obtain the optimal angle value and the optimal brightness value of the desk lamp. Compared with the prior art, the method and the device have the advantages that the characteristics of the user shadow, particularly the head area shadow, are extracted to represent the posture of the user, the influence of the shielding of the user and the illumination on the adjustment of the desk lamp can be overcome, and the accuracy is higher.

Description

Intelligent table lamp auxiliary adjusting method and system based on visual perception
Technical Field
The application relates to the field of intelligent table lamps, in particular to an auxiliary adjusting method and system of an intelligent table lamp based on visual perception.
Background
In daily work and study, the desk lamp is a very important tool. In the process of using the desk lamp, due to different sitting postures of different users, the illumination angle and the brightness of the desk lamp are generally required to be adjusted to meet the use requirements of different users. The angle and the brightness of the desk lamp are generally adjusted manually in a traditional adjusting mode, and experience is poor. In order to improve user experience, methods for adjusting intelligent table lamps gradually appear. In the existing intelligent desk lamp adjusting technology, most of the intelligent desk lamps carry out corresponding judgment on the sitting posture images of users and adjust according to judgment results, and the adjustment mode can cause limitation on the sitting posture detection of the users due to the fact that light and the users shield the problems, so that the follow-up adjustment process and results of the angle and brightness of the desk lamp are influenced.
Disclosure of Invention
In order to solve the above technical problems, the present invention aims to provide an intelligent desk lamp auxiliary adjustment method and system based on visual perception, and the adopted technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides an intelligent desk lamp auxiliary adjusting method based on visual perception, including:
acquiring a shadow image projected on a background on the opposite side of the desk lamp when a user uses the desk lamp;
acquiring parameters representing the width of the head shadow contour according to the head contour fitting curve in the shadow image;
segmenting the head outline in the shadow image until the gradient of head outline pixel points in each segmented outline section meets a preset condition, and obtaining the number of segmentation blocks of the head shadow outline;
acquiring an included angle between a connecting line of a center of gravity point of a head area and a center of gravity point of a trunk in a portrait image and the vertical direction of the image, and acquiring a user sitting posture evaluation value according to the included angle and the bending degree of the trunk of a human body;
and inputting parameters representing the width of the head shadow outline, the number of head shadow outline segmentation blocks and the user sitting posture evaluation value into an intelligent desk lamp auxiliary adjusting network to obtain the optimal angle value and the optimal brightness value of the desk lamp.
Preferably, the head contour is fitted by using a quadratic function curve, and the parameter representing the width of the head shadow contour is a quadratic function quadratic term coefficient obtained by fitting.
Preferably, the bending degree of the human body trunk is a change value of a coefficient of a quadratic term of a fitting curve of the human body trunk contour image.
Preferably, the user sitting posture assessment value includes: acquiring a connecting line of a gravity center point of a head area and a gravity center point of a trunk, acquiring an included angle between the connecting line and the vertical direction of an image, calculating the difference between the included angle and an included angle threshold value, and correcting the difference according to a first weight to obtain a first corrected value; calculating the difference between the bending degree of the human trunk and the bending degree threshold value, and correcting the difference according to a second weight to obtain a second corrected value; and constructing a user sitting posture assessment value according to the first correction value and the second correction value.
Preferably, the loss of the auxiliary regulation network of the intelligent desk lamp comprises: acquiring an angle output value of an intelligent desk lamp adjusting network, and calculating the difference between the angle output value and an angle true value label to obtain a first loss; acquiring a brightness output value of an intelligent desk lamp adjusting network, and calculating the difference between the brightness output value and a brightness true value label to obtain a second loss; and obtaining the loss of the auxiliary adjusting network of the intelligent table lamp according to the first loss and the second loss.
In a second aspect, another embodiment of the present invention provides an intelligent desk lamp auxiliary adjusting system based on visual perception, including:
the figure head image processing module is used for acquiring figure images projected on a background on the opposite side of the desk lamp when a user uses the desk lamp; acquiring parameters representing the width of the head shadow contour according to the head contour fitting curve in the shadow image; segmenting the head outline in the shadow image until the gradient of head outline pixel points in each segmented outline section meets a preset condition, and obtaining the number of segmentation blocks of the head shadow outline;
the user sitting posture assessment module is used for acquiring an included angle between a connecting line of a gravity center point of a head area and a gravity center point of a trunk in the portrait image and the vertical direction of the image and obtaining a user sitting posture assessment value according to the included angle and the bending degree of the trunk of the human body;
and the intelligent table lamp auxiliary adjusting network module inputs parameters representing the width of the head shadow contour, the number of head shadow contour segmentation blocks and the user sitting posture evaluation value into the intelligent table lamp auxiliary adjusting network module to obtain the optimal angle value and the optimal brightness value of the table lamp.
Preferably, the user sitting posture assessment value includes: acquiring a connecting line of a gravity center point of a head area and a gravity center point of a trunk, acquiring an included angle between the connecting line and the vertical direction of an image, calculating the difference between the included angle and an included angle threshold value, and correcting the difference according to a first weight to obtain a first corrected value; calculating the difference between the bending degree of the human trunk and the bending degree threshold value, and correcting the difference according to a second weight to obtain a second corrected value; and constructing a user sitting posture assessment value according to the first correction value and the second correction value.
Preferably, the loss of the auxiliary regulation network of the intelligent desk lamp comprises: acquiring an angle output value of an intelligent desk lamp adjusting network, and calculating the difference between the angle output value and an angle true value label to obtain a first loss; acquiring a brightness output value of an intelligent desk lamp adjusting network, and calculating the difference between the brightness output value and a brightness true value label to obtain a second loss; and obtaining the loss of the auxiliary adjusting network of the intelligent table lamp according to the first loss and the second loss.
The embodiment of the invention at least has the following beneficial effects:
(1) the table lamp auxiliary adjustment is carried out based on the figure characteristics, and compared with the prior art, the table lamp auxiliary adjustment method has the advantages that the particularity of the figure is utilized, and the influence caused by the problems of shielding, light rays and the like is eliminated. Specifically, the invention can obtain accurate user posture information when the light of the use environment of the desk lamp is poor, and can judge the user posture information when the user limb shields the head of the user and can still obtain the head shadow characteristic information, thereby adjusting the desk lamp.
(2) Compared with the prior art, the method for detecting the human shadow of the head region of the user has the advantages that polynomial function approximation is carried out on the human shadow edge curve, and the characteristics which accurately represent the details of the head region can be extracted by combining the number of the contour segmentation blocks.
(3) Compared with the prior art, the evaluation user sitting posture model has the advantages that the image characteristic change of the shadow is considered, and the relative accuracy is higher.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flow chart of an auxiliary adjusting method of an intelligent desk lamp based on visual perception.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined purpose, the following detailed description will be given to an auxiliary adjusting method and system for an intelligent desk lamp based on visual perception according to the present invention, with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following describes a specific scheme of an intelligent desk lamp auxiliary adjusting method and system based on visual perception in detail with reference to the accompanying drawings.
Specific example 1:
the embodiment provides an intelligent desk lamp auxiliary adjusting method based on visual perception.
The existing intelligent desk lamp adjusting technology utilizes a user image acquired by a camera to obtain a user posture, so that desk lamp adjustment is realized according to the user posture, and the adjusting effect is poor when the light of a use environment is weak or the upper body of a user is shielded. The invention is used for auxiliary adjustment of the desk lamp, and aims at the following specific scenes: the relative positions of the wall and the desk are known, the desk lamp is positioned on the left side of the user, the background wall is positioned on the right side of the user (or the desk lamp is positioned on the right side of the user, the background wall is positioned on the left side of the user according to the habits of the user), and the desk and background wall can be applied to a grid of a home and an office as well as a grid of a study room. The invention can effectively solve the problems of the existing intelligent desk lamp adjusting technology.
Referring to fig. 1, a flowchart of an auxiliary adjusting method for an intelligent desk lamp based on visual perception according to an embodiment of the present invention is shown, where the method includes:
acquiring a shadow image projected on a background on the opposite side of the desk lamp when a user uses the desk lamp; acquiring parameters representing the width of the head shadow contour according to the head contour fitting curve in the shadow image; segmenting the head outline in the shadow image until the gradient of head outline pixel points in each segmented outline section meets a preset condition, and obtaining the number of segmentation blocks of the head shadow outline; acquiring an included angle between a connecting line of a center of gravity point of a head area and a center of gravity point of a trunk in a portrait image and the vertical direction of the image, and acquiring a user sitting posture evaluation value according to the included angle and the bending degree of the trunk of a human body; and inputting parameters representing the width of the head shadow outline, the number of head shadow outline segmentation blocks and the user sitting posture evaluation value into an intelligent desk lamp auxiliary adjusting network to obtain the optimal angle value and the optimal brightness value of the desk lamp.
The method comprises the following specific steps:
after the user turns on the desk lamp, a shadow can be projected on the background wall.
First, a shadow image projected on the opposite side background of the desk lamp when the user uses the desk lamp is obtained.
Specifically, the specific process of obtaining the shadow image of the background wall area is as follows:
(1) and collecting background wall images and preprocessing the background wall images. The camera that erects through the lamp shade top of intelligent desk lamp gathers the wall image, acquires the RGB image of wall. In order to improve the image quality in the dark, the image acquisition time should be extended by 100ms and the aperture size should be enlarged. When the light is darker, light and dark noise points are easy to appear, and the background wall image is denoised through median filtering, so that the influence of the noise points is avoided.
(2) And carrying out image segmentation on the acquired image, and only keeping the image of the background wall area. The specific segmentation method adopts a semantic segmentation network: performing pixel labeling on the obtained image, wherein pixel points of the wall area are labeled as 1, and pixel points of other areas are labeled as 0; subsequently, the image with the identification tag is input into a semantic segmentation encoder and decoder, and a semantic segmentation map of the wall is output. The loss function uses cross entropy. And taking the output semantic segmentation image as a mask image, multiplying the mask image and the original image to obtain an RGB image of the wall area, and performing graying processing on the RGB image of the wall area to obtain a grayscale image of the wall area.
(3) And acquiring a portrait image on the background wall. And obtaining a shadow area image through the gray level gradients of the shadow area in the wall area and other areas of the wall.
Firstly, calculating the gray gradient of each pixel point of the gray image of the wall area. In order to improve the judging efficiency of the shadow in the background wall area, a sliding window is adopted for carrying out image gray gradient calculation. Preferably, the sliding window adopts
Figure DEST_PATH_IMAGE002
The sliding window template can adopt an edge detection operator template, and an initial sliding window area is obtained according to the relative position of the desk lamp and the user. Starting to slide from the left upper part of the sliding window area, and carrying out 8-neighborhood gray gradient calculation in the window area every time the sliding window slides, wherein the calculation method comprises the following steps:
Figure DEST_PATH_IMAGE004
calculating gray gradient vector in the neighborhood of pixel point 8, including gradient size
Figure DEST_PATH_IMAGE006
And gradient direction θ = arctan (G)y/Gx),GxRepresenting the difference in gray level in the horizontal direction, GyRepresenting the difference in gray levels in the vertical direction.
Secondly, carrying out non-maximum suppression on the gray gradient amplitude along the gradient direction, namely for each pixel point, carrying out non-maximum suppression on the gray gradient amplitude in the neighborhoodComparing the center with two pixels along the corresponding gradient direction, if the center pixel is the maximum value, retaining, otherwise, setting the center to be 0; this suppresses non-maxima and preserves the points of local gradient maxima to obtain a refined edge. Finally, setting a gray gradient difference threshold M1Preferably M1And =10, obtaining pixel points at the edge of the figure.
And finishing the detection of the shadow area of the single-frame image to obtain the shadow image of the background wall area.
Secondly, acquiring parameters representing the width of the head shadow contour according to the head contour fitting curve in the shadow image; acquiring parameters representing the width of the head shadow contour according to the head contour fitting curve in the shadow image; segmenting the head outline in the shadow image until the gradient of head outline pixel points in each segmented outline section meets a preset condition, and obtaining the number of segmentation blocks of the head shadow outline; and acquiring an included angle between a connecting line of a center of gravity point of the head area and a center of gravity point of the trunk in the portrait image and the vertical direction of the image, and acquiring a user sitting posture evaluation value according to the included angle and the bending degree of the trunk of the human body.
In particular, the preset conditions are: the gradient difference value of the adjacent head contour pixel points in each contour segment is not more than a preset threshold value.
In particular, a quadratic function curve is used for fitting the head contour, and the parameter representing the width of the head shadow contour is a quadratic function quadratic term coefficient obtained by fitting.
Particularly, a connecting line of a gravity center point of the head area and a gravity center point of the trunk is obtained, an included angle between the connecting line and the vertical direction of the image is obtained, the difference between the included angle and an included angle threshold value is calculated, and the difference is corrected according to a first weight to obtain a first correction value; calculating the difference between the bending degree of the human trunk and the bending degree threshold value, and correcting the difference according to a second weight to obtain a second corrected value; and obtaining a user sitting posture evaluation value according to the first correction value and the second correction value.
Preferably, the bending degree of the human body trunk is a change value of a coefficient of a quadratic term of a fitting curve of the human body trunk outline image.
Specifically, the process of obtaining the parameters representing the width of the head shadow contour, the number of split blocks of the head shadow contour and the user sitting posture assessment value is as follows:
(1) and extracting a head region of the obtained single-frame shadow edge outline. The extraction method comprises the steps of obtaining a priori, when a user is in a standard sitting posture state, enabling the head area to be located above the figure area, and segmenting the figure of the head area according to the figure curve characteristics. The specific segmentation method comprises the following steps: firstly, extracting the center point of the top edge of the head, the position coordinate is at the top of the shadow region and in the gradient direction
Figure DEST_PATH_IMAGE008
The point of greatest variation is the overhead edge center point. Secondly, based on the center point of the vertex edge as a starting point, curve fitting is carried out on pixel points of the silhouette edges at two sides, and a fitting equation is a quadratic function. Two rough figure edge curves are obtained through curve fitting, the edge curves may not reflect the real detail outline of the figure, and the edge details of the figure need to be obtained through subsequent fine segmentation. Thirdly, connecting corresponding points according to the obtained edge curve, and obtaining the distance d of edge pixel points on the corresponding point connecting line, wherein the distance d is the Euclidean distance between the pixel points (namely when the Euclidean distance is calculated, the distance between two most distant portrait edge pixel points on the connecting line is specifically obtained as d); and drawing a distance mapping function image according to the distance of the corresponding point, and taking a pixel point connecting line of the gradient change maximum value point in the mapping function as a neck region or a region between the head and the shoulder as a figure head dividing line. And finally, segmenting the figure head region through the head segmentation line to obtain a figure image only retaining the head.
(2) Acquiring the head shadow characteristics according to the acquired human shadow head image, wherein the specific method comprises the following steps:
the head shadow features of the present invention include: parameters representing the width of the head shadow outline and the number of segmentation blocks of the head shadow outline. The reason for using the two features will be described in detail below. Taking the dominant hand of the user as an example, the desk lamp is positioned in front of the left of the user, when the user turns the head to the right, the shadow of the head gradually changes from the shadow of the front and back diameters to the shadow of the left and right diameters because the front and back diameters of the head are larger than the left and right diameters, and when the user turns to the right, the facial contour is gradually far away from the desk lamp, and the shadow of the head gradually becomes smaller, so that the width of the contour of the shadow of the head is gradually reduced, and the details of the contour of the head can also change. When the user turns left, the width of the shadow outline of the head is changed and the details of the outline of the head are also changed due to the front-back diameter and the left-right diameter. Specifically, when the left face of the user is over against the desk lamp, the number of the split blocks of the shadow outline of the head is the largest; the left face is opposite to the desk lamp as a boundary, and the angle of the boundary is called a boundary angle. The cut-off angle can be obtained by a simulator: the method comprises the steps of obtaining the relative position relation between a desk lamp and a person, setting simulated light according to the position of the desk lamp and the attitude angle of the desk lamp in a simulator, setting a three-dimensional head model according to the relative position relation between the desk lamp and the person, and rotating the three-dimensional head model to obtain the critical angle. When the transverse rotation angle of the head is the angle on the left side of the critical angle, the change of the head shadow can be reflected by the quadratic term parameter of the fitting curve of the quadratic function of the head shadow; when the lateral corner of the head is the angle on the right side of the critical angle, the change of the shadow of the head can be reflected by the quadratic term parameter and the number of the split blocks. Therefore, the parameters of the number of the segmentation blocks of the head shadow outline and the width of the head shadow outline can accurately represent the transverse rotation of the head of the user, and the two parameters can effectively overcome the influences of the body shielding and the illumination intensity of the user.
Firstly, analyzing a single frame image to obtain a first head shadow characteristic, namely the number of head shadow contour segmentation blocks. Initial segmentation based on initial head edge profile curve the length L of the left line obtained by rough fittingzIs compared with the initial block number c0Preferably, c0=10, get initial segmentation length Lz/c0. And segmenting the actual edge image according to the initial segmentation length to obtain initial segmentation blocks with different sizes, wherein the segmentation blocks comprise all edge points of the head portrait edge in the corresponding contour segment. Then, a maximum value δ = max (α) of gradient direction change is acquired from the gradient direction of the edge point in the divided blockii-1) Where i represents a pixel point label. Preferably, a preset threshold value M is set2=2, for gradient direction changeLine constraint, when there is a partition block, there is a change value delta of gradient direction of adjacent pixel points of the contour segment>M2Then, the edge in the partition block is further subdivided, and the initial step size of subdivision is st1=10 pixels. Then judging the segmented blocks after the primary subdivision, and stopping the segmentation when the constraint is met; when the constraint is not satisfied, the step size is st2=1/2st1Continuously subdividing; and continuously iterating until the gradient direction change of the inner edge of all the partition blocks meets the constraint. Thus, the number of segmented blocks of the head shadow contour of the single-frame image is obtained. Taking the habitual hand of the user as the right hand as an example, as the transverse rotation angle of the user gradually deviates to the right side, the number of the head shadow contour segmentation blocks increases firstly and then decreases. When the number of the division blocks is
Figure DEST_PATH_IMAGE010
When the user faces the desk lamp, the user side faces the desk lamp; when the number of the divided blocks is NmaxThe larger the difference value is, the larger the amplitude of the turn of the head of the user in the direction away from the desk lamp is until the number of the segmentation blocks tends to be stable, and the protruded contour of the face of the user (mainly referring to the nose, the forehead, the mouth and the like of the face of the user) disappears.
Secondly, the image is analyzed to obtain a second head shadow characteristic, namely the width of the contour of the head shadow. Fitting curve y = ax from user's shadow of head2+ bx + c gets the parameter a of the width of the shadow outline of the head. In order to improve the characterization capability of the parameter, the embodiment further processes the parameter a
Figure DEST_PATH_IMAGE012
To characterize the angle of the user's side-turn head,
Figure DEST_PATH_IMAGE014
the larger the turn amplitude is.
And then, recording the number of the segmentation blocks and the head curve parameter of each frame as the input of a subsequent intelligent desk lamp auxiliary adjustment network. Specifically, each frame of image is subjected to face contour subdivision to obtain the number N of segmentation blocks of different frame imagesjWhere j represents an image frame tag. According to the number N of divided blocks of the video framejTo determine the face direction change in the time series state of the user. Obtaining parameters of each frame
Figure 567074DEST_PATH_IMAGE014
Furthermore, the constant parameters of the head shadow profile curve may characterize the change of the head vertex. The change of the vertex of the head can reflect the change of the pitch angle of the head, so that preferably, as another embodiment, the invention further provides a third head shadow characteristic parameter-constant parameter c of the head shadow contour fitting curve, which is used as the input of the intelligent table lamp auxiliary adjusting network.
(3) And acquiring a user sitting posture assessment value. First, a center of gravity point of a head region is acquired
Figure DEST_PATH_IMAGE016
And center of gravity of trunk
Figure DEST_PATH_IMAGE018
Of (2) a connection line
Figure DEST_PATH_IMAGE020
By means of a connecting wire
Figure 35881DEST_PATH_IMAGE020
And judging the head sitting posture state of the user according to the included angle theta between the image and the vertical direction of the image. Secondly, performing curve fitting on the human body trunk edge of the user on the image: y = a' x2+ b 'x + c'. Degree of flexion ρ =through the torso edge of the human body
Figure DEST_PATH_IMAGE022
And judging the trunk sitting posture state of the user, wherein the bending degree of the trunk of the human body is the change value of the quadratic term coefficient of the fitting curve of the contour image of the trunk of the human body. Setting included angle threshold M3=15 °, threshold value M for degree of curvature4=e3And constructing a user sitting posture assessment model to obtain a user sitting posture assessment value:
Figure DEST_PATH_IMAGE024
wherein, w1=0.4,w2=0.6 as weight parameter, θ -M3Represents the amount of change in head angle, (ρ -M)4) Indicating the amount of change in the curve of the torso edge,
Figure DEST_PATH_IMAGE026
is a first correction value for the first image data,
Figure DEST_PATH_IMAGE028
is the second correction value.
Thus, the user sitting posture assessment value is obtained.
And finally, inputting parameters representing the width of the head shadow outline, the number of head shadow outline segmentation blocks and the user sitting posture evaluation value into an intelligent desk lamp auxiliary adjusting network to obtain the optimal angle value and the optimal brightness value of the desk lamp.
In particular, the loss of the intelligent desk lamp auxiliary regulation network includes: acquiring an angle output value of an auxiliary adjusting network of the intelligent desk lamp, and calculating the difference between the angle output value and an angle true value label to obtain a first loss; acquiring a brightness output value of an auxiliary adjusting network of the intelligent desk lamp, and calculating the difference between the brightness output value and a brightness true value label to obtain a second loss; and obtaining the loss of the auxiliary adjusting network of the intelligent table lamp according to the first loss and the second loss.
Specifically, the corresponding table lamp adjustment parameter data of the current user at each rotation amplitude is acquired according to the obtained parameters of the head shadow contour width, the number of head shadow contour segmentation blocks and the user sitting posture evaluation value Eva under the user time sequence state: and marking the angle value and the brightness value by taking the data as parameters of the width of the head shadow outline corresponding to the training data, the number of the head shadow outline segmentation blocks and a user sitting posture evaluation value Eva, wherein in the network training process, a test set sample is a training set marking sample, namely, a real-time acquired index value is trained with the training set marking sample, when the real-time acquired index value data is close to the corresponding training set data, the loss function is continuously converged, and finally, the network outputs a real-time angle value gamma and a brightness value l of the table lamp. The training network adopts a full-connection network, and the network input is as follows: and acquiring each index value of the user figure in real time. The loss of the network is:
Figure DEST_PATH_IMAGE030
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE032
for loss of the network, L1、L2The first loss and the second loss are respectively.
First loss L1Comprises the following steps:
Figure DEST_PATH_IMAGE034
second loss L2Comprises the following steps:
Figure DEST_PATH_IMAGE036
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE038
is the output value of the angle, and the angle is the output value,
Figure DEST_PATH_IMAGE040
in the case of the true-value label of the angle,
Figure DEST_PATH_IMAGE042
is a value to be output for the brightness,
Figure DEST_PATH_IMAGE044
is the true luminance label, n is the number of samples.
And finally, the optimal angle value and the optimal brightness value of the real-time desk lamp can be obtained.
Meanwhile, in the process of adjusting the angle and the brightness of the desk lamp, an early warning parameter M is set according to a user sitting posture assessment model5=0.6, when Eva>M5When the desk lamp is used, the desk lamp can intelligently give an alarm to remind a user of paying attention to the sitting posture.
It should be noted that, the closer the head of the user is to the desk, the lower the brightness value of the corresponding desk lamp should be, which is related to the above-mentioned bending degree of the user's trunk edge, i.e. the bending degree is larger and the connection line is connected with
Figure 861623DEST_PATH_IMAGE020
The larger the included angle with the vertical direction is, the lower the brightness value corresponding to the desk lamp is.
Specific example 2:
the embodiment provides an intelligent desk lamp auxiliary adjusting system based on visual perception.
The existing intelligent desk lamp adjusting technology utilizes a user image acquired by a camera to obtain a user posture, so that desk lamp adjustment is realized according to the user posture, and the adjusting effect is poor when the light of a use environment is weak or the upper body of a user is shielded. The invention is used for auxiliary adjustment of the desk lamp, and aims at the following specific scenes: the relative positions of the wall and the desk are known, the desk lamp is positioned on the left side of the user, the background wall is positioned on the right side of the user (or the desk lamp is positioned on the right side of the user, the background wall is positioned on the left side of the user according to the habits of the user), and the desk and background wall can be applied to a grid of a home and an office as well as a grid of a study room. The invention can effectively solve the problems of the existing intelligent desk lamp adjusting technology.
Acquiring a shadow image projected on a background on the opposite side of the desk lamp when a user uses the desk lamp, inputting the shadow image into a shadow head image processing module, and acquiring parameters representing the width of the head shadow contour according to a head contour fitting curve in the shadow image; and segmenting the head outline in the shadow image until the gradient of the head outline pixel points in each segmented outline section meets a preset condition, and obtaining the number of segmentation blocks of the head shadow outline.
And acquiring an included angle between a connecting line of a center of gravity point of the head area and a center of gravity point of the trunk in the portrait image and the vertical direction of the image, inputting the included angle into a user sitting posture assessment module, and obtaining a user sitting posture assessment value according to the included angle and the bending degree of the trunk of the human body.
And inputting parameters representing the width of the head shadow outline, the number of head shadow outline segmentation blocks and the user sitting posture evaluation value into the intelligent table lamp auxiliary adjusting network module to obtain the optimal angle value and the optimal brightness value of the table lamp.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. An intelligent desk lamp auxiliary adjusting method based on visual perception is characterized by comprising the following steps:
acquiring a shadow image projected on a background on the opposite side of the desk lamp when a user uses the desk lamp;
acquiring parameters representing the width of the head shadow contour according to the head contour fitting curve in the shadow image;
segmenting the head outline in the shadow image until the gradient of head outline pixel points in each segmented outline section meets a preset condition, and obtaining the number of segmentation blocks of the head shadow outline;
acquiring an included angle between a connecting line of a center of gravity point of a head area and a center of gravity point of a trunk in a portrait image and the vertical direction of the image, and acquiring a user sitting posture evaluation value according to the included angle and the bending degree of the trunk of a human body;
and inputting parameters representing the width of the head shadow outline, the number of head shadow outline segmentation blocks and the user sitting posture evaluation value into an intelligent desk lamp auxiliary adjusting network to obtain the optimal angle value and the optimal brightness value of the desk lamp.
2. The intelligent desk lamp auxiliary adjusting method based on visual perception according to claim 1, wherein the method further comprises: fitting the head contour by using a quadratic function curve, wherein the parameter for representing the width of the head shadow contour is a quadratic term coefficient of the quadratic function obtained by fitting.
3. The intelligent desk lamp auxiliary adjusting method based on visual perception according to claim 1, wherein the degree of curvature of the human trunk is a coefficient of a quadratic term of a fitting curve of a contour image of the human trunk.
4. The intelligent desk lamp auxiliary adjusting method based on visual perception according to claim 1, wherein the user sitting posture assessment value comprises:
acquiring a connecting line of a gravity center point of the head area and a gravity center point of the trunk, acquiring an included angle between the connecting line and the vertical direction of the image, calculating the difference between the included angle and an included angle threshold value, and correcting the difference according to a first weight to obtain a first corrected value; calculating the difference between the bending degree of the human trunk and the bending degree threshold value, and correcting the difference according to a second weight to obtain a second corrected value;
and obtaining a user sitting posture evaluation value according to the first correction value and the second correction value.
5. The intelligent desk lamp auxiliary adjusting method based on visual perception according to claim 1, wherein the loss of the intelligent desk lamp auxiliary adjusting network comprises:
acquiring an angle output value of an auxiliary adjusting network of the intelligent desk lamp, and calculating the difference between the angle output value and an angle true value label to obtain a first loss;
acquiring a brightness output value of an auxiliary adjusting network of the intelligent desk lamp, and calculating the difference between the brightness output value and a brightness true value label to obtain a second loss;
and obtaining the loss of the auxiliary adjusting network of the intelligent table lamp according to the first loss and the second loss.
6. An intelligent desk lamp auxiliary adjusting system based on visual perception is characterized in that the system comprises:
the figure head image processing module is used for acquiring figure images projected on a background on the opposite side of the desk lamp when a user uses the desk lamp; acquiring parameters representing the width of the head shadow contour according to the head contour fitting curve in the shadow image; segmenting the head outline in the shadow image until the gradient of head outline pixel points in each segmented outline section meets a preset condition, and obtaining the number of segmentation blocks of the head shadow outline;
the user sitting posture assessment module is used for acquiring an included angle between a connecting line of a gravity center point of a head area and a gravity center point of a trunk in the portrait image and the vertical direction of the image and obtaining a user sitting posture assessment value according to the included angle and the bending degree of the trunk of the human body;
and the intelligent table lamp auxiliary adjusting network module inputs parameters representing the width of the head shadow contour, the number of head shadow contour segmentation blocks and the user sitting posture evaluation value into the intelligent table lamp auxiliary adjusting network module to obtain the optimal angle value and the optimal brightness value of the table lamp.
7. The system of claim 6, wherein the user sitting posture assessment value comprises:
acquiring a connecting line of a gravity center point of the head area and a gravity center point of the trunk, acquiring an included angle between the connecting line and the vertical direction of the image, calculating the difference between the included angle and an included angle threshold value, and correcting the difference according to a first weight to obtain a first corrected value; calculating the difference between the bending degree of the human trunk and the bending degree threshold value, and correcting the difference according to a second weight to obtain a second corrected value;
and obtaining a user sitting posture evaluation value according to the first correction value and the second correction value.
8. The intelligent desk lamp auxiliary adjusting system based on visual perception according to claim 6, wherein the loss of the intelligent desk lamp auxiliary adjusting network comprises:
acquiring an angle output value of an auxiliary adjusting network of the intelligent desk lamp, and calculating the difference between the angle output value and an angle true value label to obtain a first loss;
acquiring a brightness output value of an auxiliary adjusting network of the intelligent desk lamp, and calculating the difference between the brightness output value and a brightness true value label to obtain a second loss;
and obtaining the loss of the auxiliary adjusting network of the intelligent table lamp according to the first loss and the second loss.
CN202210229516.8A 2022-03-10 2022-03-10 Intelligent table lamp auxiliary adjusting method and system based on visual perception Active CN114333073B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210229516.8A CN114333073B (en) 2022-03-10 2022-03-10 Intelligent table lamp auxiliary adjusting method and system based on visual perception

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210229516.8A CN114333073B (en) 2022-03-10 2022-03-10 Intelligent table lamp auxiliary adjusting method and system based on visual perception

Publications (2)

Publication Number Publication Date
CN114333073A true CN114333073A (en) 2022-04-12
CN114333073B CN114333073B (en) 2022-06-07

Family

ID=81033856

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210229516.8A Active CN114333073B (en) 2022-03-10 2022-03-10 Intelligent table lamp auxiliary adjusting method and system based on visual perception

Country Status (1)

Country Link
CN (1) CN114333073B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115734436A (en) * 2022-11-08 2023-03-03 深圳市帝狼光电有限公司 Intelligent control method and device suitable for intelligent desk lamp, desk lamp and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107169456A (en) * 2017-05-16 2017-09-15 湖南巨汇科技发展有限公司 A kind of sitting posture detecting method based on sitting posture depth image
CN111988895A (en) * 2019-05-21 2020-11-24 广东小天才科技有限公司 Illumination angle adjusting method and device, intelligent desk lamp and storage medium
CN113473682A (en) * 2021-09-01 2021-10-01 启东晶尧光电科技有限公司 Artificial intelligence-based smart city lighting street lamp adjusting method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107169456A (en) * 2017-05-16 2017-09-15 湖南巨汇科技发展有限公司 A kind of sitting posture detecting method based on sitting posture depth image
CN111988895A (en) * 2019-05-21 2020-11-24 广东小天才科技有限公司 Illumination angle adjusting method and device, intelligent desk lamp and storage medium
CN113473682A (en) * 2021-09-01 2021-10-01 启东晶尧光电科技有限公司 Artificial intelligence-based smart city lighting street lamp adjusting method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115734436A (en) * 2022-11-08 2023-03-03 深圳市帝狼光电有限公司 Intelligent control method and device suitable for intelligent desk lamp, desk lamp and medium
CN115734436B (en) * 2022-11-08 2023-08-08 深圳市帝狼光电有限公司 Intelligent control method and device suitable for intelligent desk lamp, desk lamp and medium

Also Published As

Publication number Publication date
CN114333073B (en) 2022-06-07

Similar Documents

Publication Publication Date Title
CN108596849B (en) Single image defogging method based on sky region segmentation
JP4723834B2 (en) Photorealistic three-dimensional face modeling method and apparatus based on video
KR100682889B1 (en) Method and Apparatus for image-based photorealistic 3D face modeling
CN109344724A (en) A kind of certificate photo automatic background replacement method, system and server
US20170032690A1 (en) Providing drawing assistance using feature detection and semantic labeling
CN108932493B (en) Facial skin quality evaluation method
US20040037460A1 (en) Method for detecting objects in digital images
CN106920274A (en) Mobile terminal 2D key points rapid translating is the human face model building of 3D fusion deformations
CN104408462B (en) Face feature point method for rapidly positioning
CN114118144A (en) Anti-interference accurate aerial remote sensing image shadow detection method
CN109028226A (en) The kitchen ventilator of oil smoke concentration judgement is carried out based on dual area Image Acquisition
CN108710832B (en) Reference-free iris image definition detection method
CN107066932A (en) The detection of key feature points and localization method in recognition of face
CN114333073B (en) Intelligent table lamp auxiliary adjusting method and system based on visual perception
CN114494179A (en) Mobile phone back damage point detection method and system based on image recognition
CN116309607B (en) Ship type intelligent water rescue platform based on machine vision
CN109829354B (en) Face recognition method based on deep learning
CN109028237A (en) The kitchen ventilator of wind speed adjusting is carried out based on dual area Image Acquisition
CN116563799B (en) Dust online monitoring method based on video monitoring
CN113436734A (en) Tooth health assessment method and device based on face structure positioning and storage medium
CN112634125A (en) Automatic face replacement method based on off-line face database
CN109214367A (en) A kind of method for detecting human face of view-based access control model attention mechanism
CN115526811B (en) Adaptive vision SLAM method suitable for variable illumination environment
US20190347469A1 (en) Method of improving image analysis
CN109345544A (en) A kind of color difference automatic analysis method of 24 colour atla

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