[go: up one dir, main page]

CN117082690A - Control method and system of intelligent table lamp - Google Patents

Control method and system of intelligent table lamp Download PDF

Info

Publication number
CN117082690A
CN117082690A CN202311339490.3A CN202311339490A CN117082690A CN 117082690 A CN117082690 A CN 117082690A CN 202311339490 A CN202311339490 A CN 202311339490A CN 117082690 A CN117082690 A CN 117082690A
Authority
CN
China
Prior art keywords
sequence
gradient
desk lamp
text
obtaining
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
CN202311339490.3A
Other languages
Chinese (zh)
Other versions
CN117082690B (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 Deled Led Co ltd
Original Assignee
Shenzhen Deled Led 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 Deled Led Co ltd filed Critical Shenzhen Deled Led Co ltd
Priority to CN202311339490.3A priority Critical patent/CN117082690B/en
Publication of CN117082690A publication Critical patent/CN117082690A/en
Application granted granted Critical
Publication of CN117082690B publication Critical patent/CN117082690B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/105Controlling the light source in response to determined parameters
    • 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

Landscapes

  • Character Input (AREA)

Abstract

The invention relates to the technical field of desk lamp control, and provides a control method and a control system of an intelligent desk lamp, wherein gray images of books and characters are obtained; obtaining a foreground character part and a Hough straight line according to the gray level distribution condition of the gray level image of the book character, and calculating the relative deviation of part of the Hough straight line; obtaining the stroke definition of the whole gray image according to the relative deviation of the Hough straight line; acquiring the outermost peripheral closed outline of the text; obtaining each sequence according to the number of pixel points contained in the outermost periphery closed contour; obtaining the uneven character gradient of each sequence according to the gray gradient of each pixel point of the foreground character part; and obtaining the light brightness elevation factor of the whole gray level image according to the number of corner points on the outermost closed contour and the character gradient inhomogeneity of each sequence, and realizing intelligent control of the desk lamp. The invention aims to improve the induction sensitivity of the intelligent desk lamp and realize the intelligent regulation of the lamp light of the desk lamp.

Description

Control method and system of intelligent table lamp
Technical Field
The invention relates to the field of desk lamp control, in particular to a control method and system of an intelligent desk lamp.
Background
Along with the progress of the times and the development of technology, intelligent home products gradually enter the life of people, and more convenience is brought for life. Meanwhile, the intelligent desk lamp is taken as an important component of intelligent home, has the characteristics of energy conservation, comfort, individuation and the like, and is widely focused and researched. However, most of the desk lamps are teenagers with larger learning pressure, most of the intelligent desk lamps on the market can only carry out brightness adjustment according to simple gears, and can only carry out manual adjustment according to personal feeling, so that the conditions of over-bright and over-dark lamplight are easily caused, and the conditions are long-term, so that the vision fatigue of the teenagers can be caused, and even the myopia degree of a user is increased.
The traditional desk lamp mainly adjusts the brightness of the desk lamp through human or ambient environment change, the human adjustment has the problems of sensing errors and frequent adjustment, and the brightness adjustment is carried out based on the environment change, so that the problems of slower change of the intensity of ambient light and poor effect are solved.
In summary, the control method and system of the intelligent desk lamp provided by the invention have the advantages that the text ambiguity of the shot book is used as the basis for adjusting the light brightness, the automatic brightness adjustment is realized on the desk lamp by combining the image processing technology, the intelligent reading experience is provided for the user, the brightness adjustment is not needed to be manually performed, the convenience is improved, and when the text of the book is clear, the desk lamp does not increase the brightness any more, so that the energy is saved, and the people with excessive brightness is prevented from being stimulated.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a control method and a system of an intelligent table lamp, and the adopted technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for controlling an intelligent table lamp, where the method includes the following steps:
collecting text images of books;
acquiring a foreground character part of a book character image by threshold segmentation; acquiring a Hough straight line in a foreground text part; calculating the relative deviation between the Hough straight lines; obtaining the stroke definition of the text image of the book according to the relative deviation between the Hough straight lines;
acquiring the outermost closed contour of each character in the foreground character part; obtaining each sequence according to the gradient value of the pixel points contained in the outermost periphery closed contour; obtaining a fitting curve function of each sequence; obtaining gradient variation coefficients of each sequence according to the gray gradient of each pixel point of the foreground text part; obtaining the character gradient non-uniformity of each sequence according to the gradient variation coefficient of each sequence and the extremum distribution of the fitting curve function;
obtaining the ambiguity of the characters according to the angular point distribution in the outermost closed contour; and obtaining a light brightness heightening factor of the desk lamp according to the stroke definition of the text images of the books, the uneven character gradient degree of each sequence and the ambiguity of the characters, and completing the control of the intelligent desk lamp according to the light brightness heightening factor of the text images of the books.
Preferably, the calculating the relative deviation between hough straight lines includes:
and randomly sequencing the obtained Hough straight lines, wherein the relative deviation between the Hough straight lines is the difference value of the gray average value between the front adjacent Hough straight lines and the rear adjacent Hough straight lines.
Preferably, the stroke definition of the text image of the book is obtained according to the relative deviation between hough lines, and the expression is:
in the method, in the process of the invention,for the definition of strokes of text images of books, +.>The number of pixels of the foreground text part, < +.>Obtaining the number of the straight line pixels which are partially overlapped with the foreground characters for Hough straight line transformation, wherein ∈10 is the number of the pixels which are partially overlapped with the foreground characters>For the mean value of all Hough straight line gray variance, < >>For the variance of the relative deviations of all hough lines, +.>Is a natural constant.
Preferably, the obtaining each sequence according to the pixel gradient value included in the outermost periphery closed contour includes:
and obtaining each pixel point of the foreground text part in the outermost periphery closed outline of the text, and randomly sequencing the gradient values of each pixel point to obtain each sequence.
Preferably, the obtaining the fitted curve function of each sequence includes:
and for each sequence, taking the gradient value of each pixel point in the sequence as the ordinate value of each point of the sequence fitting curve function, taking the data subscript of the gradient value of each pixel point in the sequence as the abscissa value of each point of the sequence fitting curve function, and fitting according to the abscissa value and the ordinate value of each point to obtain the fitting curve function of the sequence.
Preferably, the obtaining the gradient variation coefficient of each sequence according to the gray gradient of each pixel point of the foreground text part includes:
and taking the ratio of the gradient standard deviation of the pixel points contained in each sequence to the gradient mean value as the gradient variation coefficient of each sequence.
Preferably, the text gradient non-uniformity of each sequence is obtained according to the gradient variation coefficient of each sequence and the extremum distribution of the fitting curve function, and the expression is:
in the method, in the process of the invention,for the degree of non-uniformity of the literal gradient of each sequence, < > for each sequence>For the gradient coefficient of variation of the sequences, +.>For the number of pixels contained in each sequence, < >>Fitting the number of extreme points of the curve function to each sequence,/->Fitting a Curve function to each sequence>The abscissa of the extreme points +.>Fitting a Curve function to each sequence>The abscissa of the extreme points +.>Is a natural constant.
Preferably, the obtaining the ambiguity of the text according to the angular point distribution in the outermost closed contour includes:
and taking the ratio of the number of the corner points on the outermost closed contour to the total number of the corner points contained in the characters as the ambiguity of the characters.
Preferably, the lamp brightness increasing factor of the desk lamp is obtained according to the stroke definition of the text image of the book, the uneven character gradient degree of each sequence and the ambiguity of the characters, and the expression is as follows:
in the method, in the process of the invention,for the lamp brightness of the desk lamp, the factor is increased, < + >>For the number of the closing outlines of the outermost periphery of randomly selected characters, < + >>Is->Character gradient unevenness of individual sequences, < >>Is->Ambiguity of individual words->For the definition of strokes of text images of books, +.>For the stroke clarity threshold, ++>Is natural constant (18)>Is a normalization function.
In a second aspect, an embodiment of the present invention further provides a control system for an intelligent desk lamp, including a memory, a processor, and a computer program stored in the memory and running on the processor, where the processor implements the steps of any one of the methods described above when executing the computer program.
The invention has at least the following beneficial effects:
according to the invention, the characteristics of character strokes, character gradients, angular point distribution and the like of the image to be detected are analyzed to obtain the light brightness elevation factor of the desk lamp, so that intelligent control of the desk lamp is realized, and the brightness induction sensitivity of the desk lamp is improved. According to the invention, the self-adaptive brightness adjustment of the desk lamp is realized by combining the lamp brightness increasing factor and the PWM dimming technology, so that the intelligent degree of the control of the desk lamp is improved;
further, according to the invention, the stroke definition of the image to be detected is obtained by combining the character gray level characteristics of the image to be detected, then the outermost closed contour of the characters in the image to be detected is analyzed, the gradients of the outermost closed contour surrounding the pixel points are taken to form a sequence, the extreme value distribution of the fitting curve of the sequence is analyzed to obtain the character gradient non-uniformity of each sequence, finally, the light brightness elevation factor is obtained according to the stroke definition and the character gradient non-uniformity of the image to be detected, the intelligent control of the brightness of the desk lamp is realized, and the convenience of brightness adjustment of the desk lamp is improved. The invention has the beneficial effects of high sensitivity and more intellectualization.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of steps of a control method of an intelligent desk lamp according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following is a detailed description of specific implementation, structure, characteristics and effects of the control method and system for an intelligent desk lamp according to the invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
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 specifically describes a specific scheme of a control method and a system of an intelligent table lamp provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of steps of a control method of an intelligent desk lamp according to an embodiment of the invention is shown, and the method includes the following steps:
step S001, acquiring an image to be detected of the text of the book through an image acquisition device, and preprocessing.
Specifically, in the embodiment, firstly, image acquisition is performed on book characters by using an intelligent table lamp with auxiliary shooting such as a camera, the shooting mode is overlooking shooting, so as to obtain book character images in RGB space, and it is to be noted that a lot of acquisition methods for the book character images to be detected exist, and the specific image acquisition method can be realized by the prior art, and is not in the protection scope of the embodiment, and related detailed description is not performed;
then, converting the image to be detected of the book characters into a gray image, wherein a specific method is an average value method, and secondly, denoising the image to be detected of the book characters by using a Gaussian filter denoising algorithm to remove speckle noise, wherein the average value method and the Gaussian filter denoising algorithm are all known technologies, and are not described in detail herein.
Thus, the denoising gray level image to be detected of the book text can be obtained according to the method of the embodiment and used as the data basis for the brightness adjustment of the subsequent desk lamp.
Step S002, constructing a lamp light brightness raising factor of the desk lamp according to the characteristics of character strokes, gray gradient, angular point distribution and the like of the denoising gray level image to be detected.
Specifically, the embodiment obtains the stroke definition of the whole image according to the gray distribution of the text image of the book to be detected, then establishes the uneven degree of the text gradient by analyzing the number of pixel points and gradient characteristics contained in the closed outline of the outermost periphery of the text, obtains the light brightness elevation factor of the desk lamp by utilizing the uneven degree of the text gradient as the limit index of the brightness adjustment of the desk lamp, finally realizes the intelligent control of the brightness of the desk lamp, adjusts the brightness of the desk lamp by means of sensing the change of the external environment, has the problems of slower light intensity induction, poorer effect and the like, shoots the obtained image text definition to a certain extent, reflects the illumination intensity of the current desk lamp, and when the light brightness is lower, the text of the image to be detected is more blurred, the font strokes are distorted into a group, at this moment, the light brightness is improved according to the font definition, if the brightness is excessively improved at this moment, more electric energy is wasted, the service life of the desk lamp is reduced, the stronger light brightness also stimulates eyes, glare is generated, and the eye fatigue is caused. Therefore, the invention realizes self-adaptive light brightness adjustment according to the book character ambiguity of the image to be detected, and prevents the brightness of the desk lamp from being excessively high. Therefore, the brightness of the desk lamp is adjusted by analyzing the definition of the irradiated characters of the desk lamp, and the desk lamp has the advantages of being high in sensitivity, high in convenience and the like. The construction process of the lamp brightness heightening factor of the desk lamp specifically comprises the following steps:
the books and the characters are white paper and black characters, the characters are unified to be black, the gray value is smaller, the paper is unified to be white, and the gray value is larger. Most of fonts used by the existing books are regular script, strokes exist in single characters, the strokes of the regular script are generally flat and vertical, the thickness is uniform, the change among the strokes is smooth, the single character area is not all black strokes, a certain interval exists among the strokes, and therefore white reserved white exists in the character area. However, if the brightness of the light is darker at this time, the shot image is blurred, at this time, the character strokes have halation effect, the strokes are blurred and distorted, the character strokes and the surrounding white left originally have clear and obvious boundary lines on the gray level image, the gray level gradient is larger, once the characters are blurred, the white left part originally adjacent to the strokes becomes closer to the gray level of the strokes, the gray level value is smaller, and the gray level gradient is smaller. Although individual text has different internal structures, the spacing between strokes is typically small, once the brightness is low, the text is blurred, and the strokes within the text on the image will twist and stick together, while the spacing between the text is typically greater than the spacing between the strokes and structures within the text.
If the desk lamp has proper brightness, the image is clearer, the characters in the image are clearer, the strokes are clearer and complete, and the gray values of the pixel points on each stroke are uniform because the strokes of the characters are more regular and the thicknesses are uniform, so that the edge outline of each stroke can be approximately regarded as a straight line. If the brightness of the desk lamp is low, the image is blurred, the characters in the image are blurred, and the strokes of the characters are blurred and intermittent. Meanwhile, black ink is used in the printing process of books, the colors are consistent, the strokes of the characters are printed into the same color no matter the positions or the sizes of the strokes of the characters, the strokes of the characters have the same gray value when the images are clear, the strokes of the characters have the intermittent and halation conditions when the images are blurred, and the gray value is high.
Based on the above analysis, the book text image is subjected to the oxford method threshold segmentation and hough linear transformation, which are both known techniques, and are not in the protection scope of the present embodiment, so that the description thereof will not be repeated here. The pixel point with the gray value of the book text image being larger than the threshold value is set as 255, namely the pixel value of the background paper part in the image is set as 255, the pixel point with the gray value of the book text image being smaller than the threshold value is set as 0, namely the pixel value of the foreground text part is set as 0, and the number of the pixel points of the foreground text part is recorded asSimultaneously recording Hough straight line transformation to obtain the number of the straight line pixels overlapped with the foreground character part as +.>. If the image text is clear, each Hough straight line corresponds to a suspected text stroke, more strokes are formed in the whole image, and each Hough straight line is analyzed. The number of hough straight lines detected in the image is recorded as +.>And randomly ordering the straight lines, which are marked as +.>. Calculate->The specific expression of the relative deviation is as follows: />
In the method, in the process of the invention,is->Relative deviation of straight lines +.>Is->The Hough straight line corresponds to the gray average value of all pixel points,>is->The gray average value of all pixel points corresponding to the Hough straight line is described that the method only calculates the previous +.>Relative deviation of straight lines of Hough, th ∈>The relative deviation of the Hough straight lines is not calculated, in this embodimentThe adjustment can be performed according to the actual situation, and this embodiment is not limited thereto.
If the image is clearer, the Hough straight line in the image is used as a stroke of the image text, the gray values of pixels in the stroke are very uniform, and the gray variance of the Hough straight line is smaller. Thus, the stroke definition of the whole image is constructed, and the specific expression of the stroke definition is as follows:
in the method, in the process of the invention,for the definition of strokes of text images of books, +.>The number of pixels of the foreground text part, < +.>Obtaining the number of the straight line pixels which are partially overlapped with the foreground characters for Hough straight line transformation, wherein ∈10 is the number of the pixels which are partially overlapped with the foreground characters>For the mean value of all Hough straight line gray variance, < >>For the variance of the relative deviations of all hough lines, +.>Is a natural constant.
Wherein, since all Hough straight lines are randomly selected, the absolute value of the difference between the gray average value of the next straight line and the gray average value of the straight lineCan be regarded as the absolute value of the difference of the gray-scale mean values of pixels of two random strokes in the image>The smaller the relative deviation value is, the more the gray values of the two strokes are the same, and the clearer the image is; />Is randomly selected +.>The average value of the absolute value of the gray average value difference of the strokes of the text, which has the value representing all the text images of the bookMeaning of stroke features.
In the stroke definition expression, the definition of the stroke,the larger the image, the more clear the character strokes are, and the more clear the character strokes are>The larger; under the condition of lower light brightness, the strokes of the characters can be distorted and halation, so that the gray values of the strokes are different and have variation, the gray variance of the strokes is larger at the moment, and the gray variance of the randomly selected straight lines of the strokes in the image is->The smaller the character stroke is, the clearer the character stroke is, the definition of the character stroke is->The larger; />The smaller the gray level is, the less the gray level is, the more the gray value of the pixel point is the same, the more the image is clear, the more the character stroke definition is>The larger.
Character stroke definitionThe larger the image text is, the clearer the image text is, the more suitable the current light brightness is, and the light brightness is not required to be adjusted.
If the characters in the image are blurred, the strokes in the characters can be distorted and stuck, although the structures in the single characters are different, the interval between the strokes is usually smaller, once the brightness of the light is lower, the strokes in the characters on the image can be distorted and stuck together, and the interval between the strokes in the characters is usually larger than the interval between the strokes and the structures in the characters. Therefore, for the binary image obtained by the oxford method, the contour tracing method is used to determine the outermost closed contour of each text, where the contour corresponds to a suspected text area, and the contour tracing method is not in the protection scope of the present embodiment, so that detailed description is omitted here. For all pixels with binary value of 0 in the closed contour, the Sobel operator is adopted to obtain the gray gradient of each point, the gray gradient of the pixels of clear text is larger and more consistent, if the text is more fuzzy, halation and distortion can occur near the text strokes, so that clear and obvious boundary lines between the text strokes and surrounding blank can not be clear, once the text is more fuzzy, the blank part of the original strokes becomes closer to the gray of the strokes, the gray value is smaller, the gray gradient is also smaller, and the gray gradient of the pixels of all binary foreground parts (the binary value of 0) in the area has larger difference and is uneven.
Thus based on the analysis described above, again randomly selectedThe outermost peripheral closed contour of the individual text, in this embodimentThe adjustment can be performed according to the actual situation, and the embodiment is not limited to this, if the pixels of all the binarized foreground portions inside a certain outermost closed contour in the image to be detected share +.>The gray gradient of each pixel point can be obtained by each pixel point and is arranged into a sequence, which is marked as +.>The gray gradient of each pixel point is taken as the ordinate of the point, and the data subscript of each pixel point is taken as the abscissa of the point. And obtaining a fitting curve function of the sequence by adopting a least square nonlinear fitting method. Solving the fitting curveThe number of extreme points of the line function is recorded as +.>The gradient variation coefficient of each sequence is obtained, and the specific expression of the gradient variation coefficient is as follows: />
In the method, in the process of the invention,for the gradient coefficient of variation of the sequences, +.>For the gradient variance of each sequence, +.>For the gradient mean of each sequence, +.>The larger the gradient value of the sequence is, the more discrete the gradient value of the sequence is, the more inconsistent the gradient among the pixel points is, and the larger the change is, the gradient variation coefficient is +.>The larger.
Based on the gradient change in the sequence, the character gradient non-uniformity of each sequence can be obtained, and the character gradient non-uniformity has the following specific expression:
in the method, in the process of the invention,for the degree of non-uniformity of the literal gradient of each sequence, < > for each sequence>For the gradient coefficient of variation of the sequences, +.>For each sequenceThe number of pixels involved, < >>Fitting the number of extreme points of the curve function to each sequence,/->Fitting a Curve function to each sequence>The abscissa of the extreme points +.>Fitting a Curve function to each sequence>The abscissa of the extreme points +.>Is a natural constant.
Wherein the gradient coefficient of variationThe larger the gradient of the character pixel point is, the more nonuniform the character gradient isThe larger; />The larger the number of extreme points is, the larger the proportion of the extreme points to the pixel points in the area is, the more frequent the gradient change of the pixel points in the character area is, the more uneven the gradient of the pixel points in the character is, and the degree of uneven character gradient is->The larger; difference between abscissas of two adjacent extreme points +.>The smaller the extreme points are, the denser the extreme points are, the more uneven the gradient of the character pixel points is, and the uneven character gradient is +.>The larger. Character gradient unevenness->The larger the pixel point gray gradient in the text region is, the more inconsistent the gray gradient is, the greater the degree of halation and distortion of the text strokes is, and the more blurred and unclear the text of the book is.
Meanwhile, if the strokes of the characters are blurred, distortion and halation exist, and due to the fact that the intervals between the strokes of the characters are smaller, the strokes are occupied by the distorted and halation points, corner points are concentrated on the outermost closed outline of the characters, and the number of corner points in the characters is small. Therefore, harris corner points are detected on the text area corresponding to the closed contour area, the distribution condition of the corner points in the area is obtained, and if a plurality of corner points are concentrated on the outermost closed contour, the fuzzy degree inside the text and between strokes is indicated, and the gray level change is small. Therefore, based on the characteristics, the character ambiguity is constructed, and the specific expression of the character ambiguity is as follows:
in the method, in the process of the invention,is->Character ambiguity of the surrounding area of the outermost closed contour, +.>Is->The number of corner points on the outermost closed contour, < >>Is->Within the area enclosed by the outermost peripheral closed contourTotal number of corner points->To adjust the parameters, the denominator is avoided to be zero, and the +.>Influence of the value on the result, in this example +.>。/>The larger the character region corner points are concentrated on the outermost outline, the fewer the number of the inner corner points, and the more blurred the image characters are.
Based on the analysis, the lamp brightness increasing factor of the desk lamp can be obtained
In the method, in the process of the invention,for the lamp brightness of the desk lamp, the factor is increased, < + >>For the number of the closing outlines of the outermost periphery of randomly selected characters, < + >>Is->Character gradient unevenness of individual sequences, < >>Is->The ambiguity of the outermost closed contour region of the individual text,for the definition of strokes of text images of books, +.>For the stroke clarity threshold, +.in this embodiment>The implementation can be set by the user according to the actual situation, and the embodiment is not limited to this, and the implementation is added with->Is natural constant (18)>Is normalized to a value of [0,1 ]]。
Definition of strokes for an image to be detectedThe Chinese character strokes in the image are extremely clear, and the brightness of the lamp is not required to be increased, so that the brightness of the lamp is increased by a factor +.>At this point 0. Whereas the definition of the stroke for the image to be detected +.>The text strokes in the image are blurred, and the light brightness is increased according to the blurring condition of the text. When the distortion around the stroke and the degree of halation are stronger, the gradient in the characters is more uneven and the degree of halation is more uneven>The larger the corner points of the text region are, the more concentrated on the outermost contour, the +.>The larger the text is, the more blurred the text is, and the more the brightness of the lamplight is improved; and the definition of the stroke of the image to be detected +.>And threshold->The larger the difference value of (2) is, the further the image to be detected is from the image definition, and at this time, the stroke definition is +.>The smaller the text, the more blurred the text, the more the light brightness should be increased.
Step S003, the brightness of the intelligent desk lamp is adjusted according to the light brightness increasing factor, and self-adaptive brightness adjustment of the image and character definition is achieved.
According to the lamp brightness increasing factor, the self-adaptive brightness adjustment is carried out on the desk lamp by combining with the PWM (Pulse Width Modulation, pulse broadband modulation) dimming technology, the larger the lamp brightness increasing factor is, the larger the PWM signal duty ratio is, the lamp lightens, the brightness of the intelligent desk lamp is improved, the larger the lamp brightness increasing factor is, the faster the brightness of the desk lamp is improved, and meanwhile, in order to prevent the brightness from being too high, the definition of strokes of the text and the image of the book to be detected is realizedWhen this is the case, the brightness adjustment is not continued.
Based on the same inventive concept as the above method, the embodiment of the invention also provides a control system of the intelligent desk lamp, which comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor realizes the steps of any one of the above control methods of the intelligent desk lamp when executing the computer program.
In summary, the embodiment of the invention solves the problems of slower change of the intensity of the ambient light and poor effect of the conventional desk lamp control method based on the environment change, and realizes automatic brightness adjustment of the desk lamp by taking the text ambiguity of the shot book as the basis for adjusting the brightness of the light and combining the image processing technology, thereby providing intelligent reading experience for users.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. 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 are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing description of the preferred embodiments of the present invention is not intended to be limiting, but rather, any modifications, equivalents, improvements, etc. that fall within the principles of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. The control method of the intelligent table lamp is characterized by comprising the following steps of:
collecting text images of books;
acquiring a foreground character part of a book character image by threshold segmentation; acquiring a Hough straight line in a foreground text part; calculating the relative deviation between the Hough straight lines; obtaining the stroke definition of the text image of the book according to the relative deviation between the Hough straight lines;
acquiring the outermost closed contour of each character in the foreground character part; obtaining each sequence according to the gradient value of the pixel points contained in the outermost periphery closed contour; obtaining a fitting curve function of each sequence; obtaining gradient variation coefficients of each sequence according to the gray gradient of each pixel point of the foreground text part; obtaining the character gradient non-uniformity of each sequence according to the gradient variation coefficient of each sequence and the extremum distribution of the fitting curve function;
obtaining the ambiguity of the characters according to the angular point distribution in the outermost closed contour; and obtaining a light brightness heightening factor of the desk lamp according to the stroke definition of the text images of the books, the uneven character gradient degree of each sequence and the ambiguity of the characters, and completing the control of the intelligent desk lamp according to the light brightness heightening factor of the text images of the books.
2. The method for controlling an intelligent table lamp according to claim 1, wherein calculating the relative deviation between hough straight lines comprises:
and randomly sequencing the obtained Hough straight lines, wherein the relative deviation between the Hough straight lines is the difference value of the gray average value between the front adjacent Hough straight lines and the rear adjacent Hough straight lines.
3. The method for controlling an intelligent desk lamp according to claim 1, wherein the stroke definition of the text image of the book is obtained according to the relative deviation between hough straight lines, and the expression is:
in the method, in the process of the invention,for the definition of strokes of text images of books, +.>The number of pixels of the foreground text part, < +.>Obtaining the number of the straight line pixels which are partially overlapped with the foreground characters for Hough straight line transformation, wherein ∈10 is the number of the pixels which are partially overlapped with the foreground characters>For the mean value of all Hough straight line gray variance, < >>For the variance of the relative deviations of all hough lines, +.>Is a natural constant.
4. The method for controlling an intelligent desk lamp according to claim 1, wherein the obtaining each sequence according to the gradient value of the pixel point included in the outermost closed contour comprises:
and obtaining each pixel point of the foreground text part in the outermost periphery closed outline of the text, and randomly sequencing the gradient values of each pixel point to obtain each sequence.
5. The method for controlling an intelligent desk lamp according to claim 1, wherein the obtaining the fitted curve function of each sequence comprises:
and for each sequence, taking the gradient value of each pixel point in the sequence as the ordinate value of each point of the sequence fitting curve function, taking the data subscript of the gradient value of each pixel point in the sequence as the abscissa value of each point of the sequence fitting curve function, and fitting according to the abscissa value and the ordinate value of each point to obtain the fitting curve function of the sequence.
6. The method for controlling an intelligent desk lamp according to claim 1, wherein the obtaining gradient variation coefficients of each sequence according to the gray scale gradient of each pixel point of the foreground text portion comprises:
and taking the ratio of the gradient standard deviation of the pixel points contained in each sequence to the gradient mean value as the gradient variation coefficient of each sequence.
7. The method for controlling an intelligent desk lamp according to claim 1, wherein the text gradient non-uniformity of each sequence is obtained according to the gradient variation coefficient of each sequence and the extremum distribution of the fitting curve function, and the expression is:
in the method, in the process of the invention,for the degree of non-uniformity of the literal gradient of each sequence, < > for each sequence>For the gradient coefficient of variation of the sequences, +.>For the number of pixels contained in each sequence, < >>Fitting the number of extreme points of the curve function to each sequence,/->Fitting a Curve function to each sequence>The abscissa of the extreme points +.>Fitting a Curve function to each sequence>The abscissa of the extreme points +.>Is a natural constant.
8. The control method of the intelligent desk lamp according to claim 1, wherein the character ambiguity is obtained according to the angular point distribution in the outermost closed contour, and the specific method comprises the following steps:
and taking the ratio of the number of the corner points on the outermost closed contour to the total number of the corner points contained in the characters as the ambiguity of the characters.
9. The method for controlling an intelligent desk lamp according to claim 1, wherein the stroke definition according to the text image of the book, each sequenceThe uneven degree of the character gradient and the ambiguity of the characters obtain the lamp brightness heightening factor of the desk lamp, and the expression is:
in the method, in the process of the invention,for the lamp brightness of the desk lamp, the factor is increased, < + >>For the number of the closing outlines of the outermost periphery of randomly selected characters, < + >>Is->Character gradient unevenness of individual sequences, < >>Is->Ambiguity of individual words->For the definition of strokes of text images of books, +.>For the stroke clarity threshold, ++>Is natural constant (18)>Is a normalization function.
10. A control system for an intelligent desk lamp comprising a memory, a processor and a computer program stored in said memory and running on said processor, characterized in that said processor implements the steps of the method according to any one of claims 1-9 when said computer program is executed by said processor.
CN202311339490.3A 2023-10-17 2023-10-17 Control method and system of intelligent table lamp Active CN117082690B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311339490.3A CN117082690B (en) 2023-10-17 2023-10-17 Control method and system of intelligent table lamp

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311339490.3A CN117082690B (en) 2023-10-17 2023-10-17 Control method and system of intelligent table lamp

Publications (2)

Publication Number Publication Date
CN117082690A true CN117082690A (en) 2023-11-17
CN117082690B CN117082690B (en) 2023-12-22

Family

ID=88704684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311339490.3A Active CN117082690B (en) 2023-10-17 2023-10-17 Control method and system of intelligent table lamp

Country Status (1)

Country Link
CN (1) CN117082690B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117560826A (en) * 2024-01-10 2024-02-13 西安南洋迪克整装智能家居有限公司 Automatic lighting device of intelligent cabinet
CN117952860A (en) * 2024-03-27 2024-04-30 山东正禾大教育科技有限公司 Mobile digital publishing method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010123532A (en) * 2008-11-21 2010-06-03 Panasonic Electric Works Co Ltd Lighting control system
CN105930813A (en) * 2016-04-27 2016-09-07 北京以萨技术股份有限公司 Method for detecting line text under any natural scene
CN205693957U (en) * 2016-06-12 2016-11-16 丁迪 Illuminator automation equipment based on picture signal
CN112020173A (en) * 2019-05-29 2020-12-01 广东小天才科技有限公司 Light adjusting method and intelligent desk lamp
CN113438779A (en) * 2021-06-01 2021-09-24 超级视线科技有限公司 Method for triggering street lamp illumination intensity adjustment based on image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010123532A (en) * 2008-11-21 2010-06-03 Panasonic Electric Works Co Ltd Lighting control system
CN105930813A (en) * 2016-04-27 2016-09-07 北京以萨技术股份有限公司 Method for detecting line text under any natural scene
CN205693957U (en) * 2016-06-12 2016-11-16 丁迪 Illuminator automation equipment based on picture signal
CN112020173A (en) * 2019-05-29 2020-12-01 广东小天才科技有限公司 Light adjusting method and intelligent desk lamp
CN113438779A (en) * 2021-06-01 2021-09-24 超级视线科技有限公司 Method for triggering street lamp illumination intensity adjustment based on image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈雪娇等: "基于单片机的智能台灯设计", 《电子测试 》, pages 34 - 36 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117560826A (en) * 2024-01-10 2024-02-13 西安南洋迪克整装智能家居有限公司 Automatic lighting device of intelligent cabinet
CN117560826B (en) * 2024-01-10 2024-03-29 西安南洋迪克整装智能家居有限公司 Automatic lighting device of intelligent cabinet
CN117952860A (en) * 2024-03-27 2024-04-30 山东正禾大教育科技有限公司 Mobile digital publishing method and system

Also Published As

Publication number Publication date
CN117082690B (en) 2023-12-22

Similar Documents

Publication Publication Date Title
CN117082690B (en) Control method and system of intelligent table lamp
Wang et al. Adaptive image enhancement method for correcting low-illumination images
CN110570360B (en) A robust and comprehensive low-quality illumination image enhancement method based on Retinex
US8638338B2 (en) Adjusting color attribute of an image in a non-uniform way
CN109147005B (en) Self-adaptive dyeing method and system for infrared image, storage medium and terminal
CN106791471A (en) Image optimization method, image optimization device and terminal
CN105741245B (en) Adaptive contrast enhancement algorithm based on greyscale transformation
CN104881853A (en) Skin color rectification method and system based on color conceptualization
CN109325918B (en) Image processing method and device and computer storage medium
CN110473152B (en) Image Enhancement Method Based on Improved Retinex Algorithm
CN104021531A (en) Improved method for enhancing dark environment images on basis of single-scale Retinex
CN115456905B (en) Single image defogging method based on bright-dark region segmentation
CN110473158A (en) A kind of processing method, device and the equipment of license plate image brightness
Subramani et al. Quadrant dynamic clipped histogram equalization with gamma correction for color image enhancement
CN113947553B (en) Image brightness enhancement method and device
CN113962898A (en) Low-illumination image enhancement method based on illumination map optimization and adaptive gamma correction
Wang et al. Low-light image enhancement by deep learning network for improved illumination map
CN113191956B (en) Backlight image enhancement method based on depth matting
CN104346791A (en) Method for correcting imaging defects of particles in flow cell
Meylan Tone mapping for high dynamic range images
CN116416162A (en) Image enhancement method and system based on improved MSR and CLAHE
CN116309133A (en) Low-light image enhancement method for local and global self-adaptive contrast correction
CN118447020B (en) Printing typesetting abnormality detection method and device based on image recognition
CN105913391B (en) A kind of defogging method can be changed Morphological Reconstruction based on shape
CN114119433B (en) A dark image processing method based on Bezier curve

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