The invention content is as follows:
the prior art is difficult to meet the needs of people, and in order to solve the existing problems, the invention provides an intelligent indoor lighting system;
in order to achieve the purpose, the invention provides the following technical scheme: the utility model provides an indoor lighting system of intelligence, includes environmental monitoring module, data analysis module, system control module and lighting module, environmental monitoring module transmits the data transmission who gathers to data analysis module, data analysis module transmits the data transmission after the data analysis processing to system control module.
Preferably, the system control module controls the illumination module to selectively switch on and off, the data analysis module adopts a single chip microcomputer of an STM32F103ZET6 chip to perform data processing, judges the current environment brightness, judges whether a person exists in a designated area, and judges whether the projector is started;
(1) judging whether a person is in the designated area
Firstly, acquiring an unmanned initial environment image, dividing the image into four regions according to an XY axis, acquiring a current classroom environment image by using a camera, comparing the two images, segmenting a position coordinate of a human body by using a background segmentation method, and determining a blocking region of the human body to read current brightness;
(2) judging the current environment brightness
Firstly, setting a proper brightness value and a saturation brightness value; by adjusting the illumination, the environment illumination is kept within a proper illumination and environment illumination range; in national architectural lighting design Standard (GB50034-2004), the classroom illuminance should be 150-300 lux, and 230lux is adopted as a proper brightness value; when the illumination intensity is greater than 230lux, the classroom illumination is determined to be sufficient; if the area with people is at the proper brightness value, the lamp is not turned on; if the brightness value does not reach the proper brightness value, the singlechip controls the brightness of the lamp to be improved from weak to strong;
(3) judging whether the projector is turned on
After a current environment image is obtained by a camera, a projection screen area is divided under XY axis coordinates, the screen area is compared with an initial environment image, whether the screen is put down is judged by a background segmentation method, if the screen is judged to be opened by a projector, a lamp close to the projector area is turned off, a proper brightness value is reduced, and other areas are adjusted and maintain the illumination at the proper brightness value.
Preferably, the environment monitoring module adopts an OV7670 camera to realize image acquisition.
The photosensitive array of the OV7670 camera is 640 × 480, 8-bit data with various resolutions in modes of whole frame, sub-sampling, window taking and the like can be output through SCCB bus control, and the highest frame rate reaches 30 frames/second; the image is collected at fixed time by adjusting the photographing frame rate, the picture resolution, the data format and the signal transmission speed in the program, and the data with the proper size is transmitted to the corresponding input port of the singlechip.
Preferably, the system control module adopts a single chip microcomputer of an STM32F103ZET6 chip, and controls light by sending an instruction to an output end;
(1) regulating output high and low levels
The output port of the product connected with the LED lamp is set to be pull-up output, and the output port of the product corresponding to the output port outputs high level for the area without human body activity according to the acquired human body activity information of the specific area; for the area where the human body activity is detected, the corresponding output port outputs low level;
(2) adjusting PWM duty cycle
Because the change range of the light intensity in a daily room is fixed, the product divides the range into ten intervals, divides the light brightness into corresponding ten grades, namely changes the pulse width value (PWM) of the light brightness; after the current brightness is obtained, the lamp is firstly started to obtain the first-level brightness, the current environment image is obtained again, the illumination is analyzed, whether the enough brightness is achieved or not is judged until the enough brightness is achieved, and therefore the constant illumination is guaranteed; meanwhile, in order to prevent the ambient brightness from exceeding the saturated brightness, if the current ambient brightness exceeds the saturated ambient brightness, the brightness of the lamp should be decreased from strong to weak in order to reach a proper brightness value.
Preferably, the lighting module is an indoor lamp, and the lamp is connected with the relay.
An operation method of an intelligent indoor lighting system comprises the following steps:
(1) initializing a single chip microcomputer of an STM32F103ZET6 chip, wherein the single chip microcomputer comprises input and output ends, timer interruption, external interruption and OV7670 camera initialization;
(2) acquiring an initial environment image by using a camera, acquiring a classroom environment image every 2-3 seconds, transmitting the acquired image to a data analysis module, and analyzing to judge whether a person is in a room;
(3) when the data analysis module judges that no person is in the room, other functions of the product are not started;
(4) when the data analysis module judges that a person is in the room, the position of the person and the switching condition of the projector are continuously obtained through the collected pictures; reading the current brightness value and adjusting the duty ratio of an output port; finally, the lamps in the corresponding areas are switched on and off through the system control module, and the brightness is adjusted to a proper value and kept stable;
(5) when the indoor condition changes, for example, the indoor condition changes from manned to unmanned, and the projector changes from off to on state, the system senses the relevant change and delays for 10S, and then adjusts the data of the output port to change the indoor light and keep the state stable.
The indoor lighting system utilizes image processing, target recognition, environmental perception and related technologies thereof to complete an intelligent indoor lighting system based on image recognition and an STM32 chip; compared with the traditional manual control mode, the automatic control lighting loop can be realized, and the automatic management of lighting is realized; compared with an infrared sensor mode, personnel statistics and indoor illumination and detection can be carried out according to image recognition, illumination loops in corresponding areas can be automatically switched on and off and intelligently adjusted according to the quantity of personnel, the current illumination and the current required illumination (such as whether a projector is started to emit corresponding required indoor light in a classroom or not), sensitive induction and accurate statistics are achieved, and intelligent lighting adjustment, lighting in few zones and lighting in out of people are achieved; the key technology is as follows:
image processing:
namely, the process of digitalizing the analog image through the process of sampling and quantizing; the single chip microcomputer of the STM32F103ZET6 chip can read an image with the resolution of 320 x 240 from a camera, and each second can reach 10-15 frames; the data with proper size can be transmitted to the corresponding input end of the singlechip by adjusting the picture resolution, the data format and the signal transmission speed in the program;
target identification:
firstly, acquiring an initial environment image by a camera, and then acquiring a classroom environment image every 2-3 seconds to judge whether an object needing illumination exists in the current environment;
environmental perception:
the camera collects a classroom picture every 2-3 seconds, and the picture format collected by the camera is mostly RGB format; we will map the RGB gamut space to the HSV space by an algorithm; in the HSV model, H represents hue, S represents saturation and V represents brightness, so that the indoor environment brightness detection can be realized by adopting the HSV model.
The data collection is carried out by utilizing the camera, and the sensitivity of the camera is higher unlike a sensor;
the installation is simple and easy, and the wiring is less;
as the cameras are installed in most classrooms of colleges, the product has the advantage of unique cost saving, and the overall cost is greatly saved.
Compared with the prior art, the invention has the beneficial effects that:
the product applies the image processing technology to the lighting control system, namely, a camera arranged indoors is used for shooting pictures, the human body activity information and the illumination intensity are read, the data information is processed by a single chip microcomputer through an image recognition algorithm, and an instruction is output, so that the adjustment of the lighting opening area and the brightness is completed. Compared with a lighting system based on a sensor, the lighting system has the advantages that the wiring problem during installation is greatly reduced, the operation is simpler and easier, the lighting system is more suitable for being used in an indoor environment with a larger area in a large range, and the sensitivity and the stability are higher.
The design is simple to operate, high in comprehensive practicability and easy to popularize and use.
the specific implementation mode is as follows:
in order to make the technical means, the creation characteristics, the achievement purposes and the effects of the invention easy to understand, the invention is further explained by combining the specific figures;
embodiment 1, an intelligent indoor lighting system, including environment monitoring module, data analysis module, system control module and lighting module, the data transmission that the environment monitoring module will gather is to data analysis module, data analysis module transmits the data transmission after the data analysis is handled to system control module, system control module control lighting module carries out the selectivity switch.
The environment monitoring module adopts an OV7670 camera to realize image acquisition.
The photosensitive array of the OV7670 camera is 640 × 480, 8-bit data with various resolutions in modes of whole frame, sub-sampling, window taking and the like can be output through SCCB bus control, and the highest frame rate reaches 30 frames/second; the image is collected at fixed time by adjusting the photographing frame rate, the picture resolution, the data format and the signal transmission speed in the program, and the data with the proper size is transmitted to the corresponding input port of the singlechip.
The data analysis module adopts the singlechip of STM32F103ZET6 chip to carry out data processing, judges current ambient brightness, judges whether someone in appointed region, judges whether the projecting apparatus opens.
The system control module adopts the singlechip of STM32F103ZET6 chip, through sending the instruction to the output, control light.
The lighting module is an indoor lamp, and the lamp is connected with the relay.
An operation method of an intelligent indoor lighting system comprises the following steps:
(1) initializing a single chip microcomputer of an STM32F103ZET6 chip, wherein the single chip microcomputer comprises input and output ends, timer interruption, external interruption and OV7670 camera initialization;
(2) acquiring an initial environment image by using a camera, acquiring a classroom environment image every 2-3 seconds, transmitting the acquired image to a data analysis module, and analyzing to judge whether a person is in a room;
(3) when the data analysis module judges that no person is in the room, other functions of the product are not started;
(4) when the data analysis module judges that a person is in the room, the position of the person and the switching condition of the projector are continuously obtained through the collected pictures; reading the current brightness value and adjusting the duty ratio of an output port; finally, the lamps in the corresponding areas are switched on and off through the system control module, and the brightness is adjusted to a proper value and kept stable;
(5) when the indoor condition changes, for example, the indoor condition changes from manned to unmanned, and the projector changes from off to on state, the system senses the relevant change and delays for 10S, and then adjusts the data of the output port to change the indoor light and keep the state stable.
Embodiment 2, an intelligent indoor lighting system, includes environment monitoring module, data analysis module, system control module and lighting module, the data transmission that the environment monitoring module will gather is to data analysis module, data analysis module transmits the data transmission after the data analysis is handled to system control module, system control module control lighting module carries out the selectivity switch.
The environment monitoring module adopts an OV7670 camera to realize image acquisition.
The photosensitive array of the OV7670 camera is 640 × 480, 8-bit data with various resolutions in modes of whole frame, sub-sampling, window taking and the like can be output through SCCB bus control, and the highest frame rate reaches 30 frames/second; the image is collected at fixed time by adjusting the photographing frame rate, the picture resolution, the data format and the signal transmission speed in the program, and the data with the proper size is transmitted to the corresponding input port of the singlechip.
The data analysis module adopts a single chip microcomputer of an STM32F103ZET6 chip to perform data processing, judges the current environment brightness, judges whether a person exists in a designated area or not, and judges whether the projector is started or not;
(1) judging whether a person is in the designated area
Firstly, acquiring an unmanned initial environment image, dividing the image into four regions according to an XY axis, acquiring a current classroom environment image by using a camera, comparing the two images, segmenting a position coordinate of a human body by using a background segmentation method, and determining a blocking region of the human body to read current brightness;
(2) judging the current environment brightness
Firstly, setting a proper brightness value and a saturation brightness value; by adjusting the illumination, the environment illumination is kept within a proper illumination and environment illumination range; in national architectural lighting design Standard (GB50034-2004), the classroom illuminance should be 150-300 lux, and 230lux is adopted as a proper brightness value; when the illumination intensity is greater than 230lux, the classroom illumination is determined to be sufficient; if the area with people is at the proper brightness value, the lamp is not turned on; if the brightness value does not reach the proper brightness value, the singlechip controls the brightness of the lamp to be improved from weak to strong;
(3) judging whether the projector is turned on
After a current environment image is obtained by a camera, a projection screen area is divided under XY axis coordinates, the screen area is compared with an initial environment image, whether the screen is put down is judged by a background segmentation method, if the screen is judged to be opened by a projector, a lamp close to the projector area is turned off, a proper brightness value is reduced, and other areas are adjusted and maintain the illumination at the proper brightness value.
The system control module adopts the singlechip of STM32F103ZET6 chip, through sending the instruction to the output, control light.
The lighting module is an indoor lamp, and the lamp is connected with the relay.
Embodiment 3, an intelligent indoor lighting system, includes environment monitoring module, data analysis module, system control module and lighting module, the data transmission that the environment monitoring module will gather is to data analysis module, data analysis module transmits the data transmission after the data analysis is handled to system control module, system control module control lighting module carries out the selectivity switch.
The environment monitoring module adopts an OV7670 camera to realize image acquisition.
The photosensitive array of the OV7670 camera is 640 × 480, 8-bit data with various resolutions in modes of whole frame, sub-sampling, window taking and the like can be output through SCCB bus control, and the highest frame rate reaches 30 frames/second; the image is collected at fixed time by adjusting the photographing frame rate, the picture resolution, the data format and the signal transmission speed in the program, and the data with the proper size is transmitted to the corresponding input port of the singlechip.
The data analysis module adopts the singlechip of STM32F103ZET6 chip to carry out data processing, judges current ambient brightness, judges whether someone in appointed region, judges whether the projecting apparatus opens.
The system control module adopts a single chip microcomputer of an STM32F103ZET6 chip and controls light by sending instructions to an output end;
(1) regulating output high and low levels
The output port of the product connected with the LED lamp is set to be pull-up output, and the output port of the product corresponding to the output port outputs high level for the area without human body activity according to the acquired human body activity information of the specific area; for the module which detects the human body activity, the corresponding output port outputs low level;
(2) adjusting PWM duty cycle
Because the change range of the light intensity in a daily room is fixed, the product divides the range into ten intervals, divides the light brightness into corresponding ten grades, namely changes the pulse width value (PWM) of the light brightness; after the current brightness is obtained, the lamp is firstly started to obtain the first-level brightness, the current environment image is obtained again, the illumination is analyzed, whether the enough brightness is achieved or not is judged until the enough brightness is achieved, and therefore the constant illumination is guaranteed; meanwhile, in order to prevent the ambient brightness from exceeding the saturated brightness, if the current ambient brightness exceeds the saturated ambient brightness, the brightness of the lamp should be decreased from strong to weak in order to reach a proper brightness value.
The lighting module is an indoor lamp, and the lamp is connected with the relay.
Embodiment 4, an intelligent indoor lighting system, including environment monitoring module, data analysis module, system control module and lighting module, the data transmission that the environment monitoring module will gather is to data analysis module, data analysis module transmits the data transmission after the data analysis is handled to system control module, system control module control lighting module carries out the selectivity switch.
The data analysis module adopts a single chip microcomputer of an STM32F103ZET6 chip to perform data processing, judges the current environment brightness, judges whether a person exists in a designated area or not, and judges whether the projector is started or not;
(1) judging whether a person is in the designated area
Firstly, acquiring an unmanned initial environment image, dividing the image into four regions according to an XY axis, acquiring a current classroom environment image by using a camera, comparing the two images, segmenting a position coordinate of a human body by using a background segmentation method, and determining a blocking region of the human body to read current brightness;
(2) judging the current environment brightness
Firstly, setting a proper brightness value and a saturation brightness value; by adjusting the illumination, the environment illumination is kept within a proper illumination and environment illumination range; in national architectural lighting design Standard (GB50034-2004), the classroom illuminance should be 150-300 lux, and 230lux is adopted as a proper brightness value; when the illumination intensity is greater than 230lux, the classroom illumination is determined to be sufficient; if the area with people is at the proper brightness value, the lamp is not turned on; if the brightness value does not reach the proper brightness value, the singlechip controls the brightness of the lamp to be improved from weak to strong;
(3) judging whether the projector is turned on
After a current environment image is obtained by a camera, a projection screen area is divided under XY axis coordinates, the screen area is compared with an initial environment image, whether the screen is put down is judged by a background segmentation method, if the screen is judged to be opened by a projector, a lamp close to the projector area is turned off, a proper brightness value is reduced, and other areas are adjusted and maintain the illumination at the proper brightness value.
The environment monitoring module adopts an OV7670 camera to realize image acquisition.
The photosensitive array of the OV7670 camera is 640 × 480, 8-bit data with various resolutions in modes of whole frame, sub-sampling, window taking and the like can be output through SCCB bus control, and the highest frame rate reaches 30 frames/second; the method comprises the steps of acquiring images at fixed time by adjusting a photographing frame rate, picture resolution, data format and signal transmission speed in a program, and transmitting data with a proper size to a corresponding input port of a single chip microcomputer;
the system control module adopts the singlechip of STM32F103ZET6 chip, through sending the instruction to the output, control light.
(1) Regulating output high and low levels
The output port of the product connected with the LED lamp is set to be pull-up output, and the output port of the product corresponding to the output port outputs high level for the area without human body activity according to the acquired human body activity information of the specific area; for the area where the human body activity is detected, the corresponding output port outputs low level;
(2) adjusting PWM duty cycle
Because the change range of the light intensity in a daily room is fixed, the product divides the range into ten intervals, divides the light brightness into corresponding ten grades, namely changes the pulse width value (PWM) of the light brightness; after the current brightness is obtained, the lamp is firstly started to obtain the first-level brightness, the current environment image is obtained again, the illumination is analyzed, whether the enough brightness is achieved or not is judged until the enough brightness is achieved, and therefore the constant illumination is guaranteed; meanwhile, in order to prevent the ambient brightness from exceeding the saturated brightness, if the current ambient brightness exceeds the saturated ambient brightness, the brightness of the lamp should be decreased from strong to weak in order to reach a proper brightness value.
The lighting module is an indoor lamp, and the lamp is connected with the relay.
An operation method of an intelligent indoor lighting system comprises the following steps:
(1) initializing a single chip microcomputer of an STM32F103ZET6 chip, wherein the single chip microcomputer comprises input and output ends, timer interruption, external interruption and OV7670 camera initialization;
(2) acquiring an initial environment image by using a camera, acquiring a classroom environment image every 2-3 seconds, transmitting the acquired image to a data analysis module, and analyzing to judge whether a person is in a room;
(3) when the data analysis module judges that no person is in the room, other functions of the product are not started;
(4) when the data analysis module judges that a person is in the room, the position of the person and the switching condition of the projector are continuously obtained through the collected pictures; reading the current brightness value and adjusting the duty ratio of an output port; finally, the lamps in the corresponding areas are switched on and off through the system control module, and the brightness is adjusted to a proper value and kept stable;
(5) when the indoor condition changes, for example, the indoor condition changes from manned to unmanned, and the projector changes from off to on state, the system senses the relevant change and delays for 10S, and then adjusts the data of the output port to change the indoor light and keep the state stable.
The foregoing shows and describes the general principles and broad features of the present invention and advantages thereof; it will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are given by way of illustration of the principles of the present invention, and that various changes and modifications may be made without departing from the spirit and scope of the invention as defined by the appended claims; the scope of the invention is defined by the appended claims and equivalents thereof.