Embedded Microcontroller with a CCD Camera as a Digital Lighting Control System
Abstract
1. Introduction
2. Design of the Proposed Embedded Camera Control System
3. Implementation of the Integrated Platform
3.1. Hardware System Description
3.2. Software System Description
3.2.1. Embedded Computer Operating System
3.2.2. TCP/IP Ethernet Communication
3.2.3. Vimba Software Development Kit
3.2.4. Image Processing
4. Software Module Development and Testing
4.1. Camera Control Modules
4.2. Testing
5. Identification of Image Dark and Light Areas in a Computer Laboratory as a Case Study
5.1. MATLAB and BeagleBone Black Connection
- cam = beaglebone.webcam(bbb);
- img = snapshot(cam);
5.2. Image Areas Identification and Processing Algorithm—Experimental Results
- r = img(:,:,1);
- g = img(:,:,2);
- b = img(:,:,3);
- Red = r − g/2 − b/2;
- Green = g − r/2 − b/2;
- Blue = b − r/2 − g/2;
- bwb = Blue > thresh;
- bwg = Green > thresh;
- bwr= Red > thresh;
- bwr_thresholded= im2bw(bwr); figure; imshow(bwr_thresholded); title(’Red thresholded’);
- bwg_thresholded= im2bw(bwg); figure; imshow(bwg_thresholded); title(’Green thresholded’);
- bwb_thresholded= im2bw(bwb); figure; imshow(bwb_thresholded); title(’Blue thresholded’);
5.3. Control Unit Power Consumption—Experimental Results
5.4. Control of the DALI Digital Lighting System
- [x, y] = find(bwg);
- xx = max(1, round(mean(x)) − 5):min(round(mean(x)) + 5, size(area, 1));
- yy = max(1, round(mean(y)) −5 ):min(round(mean(y)) + 5, size(area, 2));
- bwgv = bwg(xx, yy);
- img(:,:,1) = uint8(r + bwgv);.
- img(:,:,2) = uint8(g − bwgv);
- img(:,:,3) = uint8(b − bwgv);
6. Conclusions
- It is a flexible control system, based on a low-cost, low-powered ARM-based BeagleBone Black microcontroller and high-resolution CCD GigE IP camera controlled via Ethernet/internet (although a low-cost, low-energy consumption CMOS camera could have also been used).
- Simple but efficient image segmentation algorithm for illuminance estimation of specific ‘light areas’ (in contrast to the ‘dark areas’) and higher accuracy in the control of lighting ballasts. Both features lead to higher energy savings.
- Rapid application development and ease of modification based on high-level coding language and the use of open source image libraries such as C++ CImg, which could also enable efficient commissioning in terms of time and cost, or provide other maintenance and control benefits to the individual user.
- Although the installed power is slightly larger for the microcontroller and camera control system compared with a typical photosensor, the overall energy performance is almost equivalent and the differences in energy consumption are negligible.
Author Contributions
Acknowledgments
Conflicts of Interest
Appendix A
/* Partial code for grabbing and saving an image as a bitmap */
#include <stdio.h>
#include <SynchronousGrab.h>
int main(){
char* pCameraID = "DEV_000F31024586"; /* camera ID */
const char* pFileName = "SGrab.bmp"; /* bitmap image filename */
/* grab and save an image as a bitmap */
return(SynchronousGrab( pCameraID, pFileName )); }
/* Partial code for image threshold */
#include <string>
#include <cstring>
#include <iostream>
#include "CImg.h" /* CImg image processing library */
int main( int argc, char* argv[] ){
char* pCameraID = "DEV_000F31024586"; /* camera ID */
const char* pFileName = "SGrab.bmp"; /* bitmap image filename */
const char* output = "ThreshGrab.bmp"; /* thresholded image*/
…….
cimg_library::CImg<unsigned char> image(pFileName);
cimg_library::CImgDisplay main_disp(image);
while (!main_disp.is_closed()) {
main_disp.wait();
if (main_disp.button() && main_disp.mouse_y()>=0)
{
cimg_library::CImgDisplay main_disp2(image.get_threshold(128).normalize(0,255);
image=image.get_threshold(128).normalize(0,255);
image.save(output);
while (!main_disp2.is_closed()) {
main_disp2.wait();
if (main_disp2.button() && main_disp2.mouse_y()>=0) {exit(0);}}}}}
References
- Jenkins, D.; Newborough, M. An approach for estimating the carbon emissions associated with office lighting with a daylight contribution. Appl. Energy 2007, 84, 608–622. [Google Scholar] [CrossRef]
- Khan, N.; Abas, N. Comparative study of energy saving light sources. Renew. Sustain. Energy Rev. 2011, 15, 296–309. [Google Scholar] [CrossRef]
- Pérez-Lombard, L.; Ortiz, J.; Pout, C. A review on buildings energy consumption information. Energy Build. 2008, 40, 394–398. [Google Scholar] [CrossRef]
- Ahn, B.-L.; Jang, C.-Y.; Leigh, S.-B.; Yoo, S.; Jeong, H. Effect of LED lighting on the cooling and heating loads in office buildings. Appl. Energy 2014, 113, 1484–1489. [Google Scholar] [CrossRef]
- Li, P.; Li, J.-P. Embedded Intelligent Home Control System Based on Arm Linux. In Proceedings of the International Conference on Wavelet Active Media Technology and Information Processing (ICWAMTIP), Chengdu, China, 17–19 December 2012; pp. 429–431. [Google Scholar] [CrossRef]
- Li, X.-H.; Liu, J.-H. Design of embedded data acquisition and remote control system based on Linux. In Proceedings of the International Conference on Computer Application and System Modeling, Taiyuan, China, 22–24 October 2010; Volume 3, pp. 299–302. [Google Scholar] [CrossRef]
- Kim, I.S.; Choi, H.S.; Yi, K.M.; Choi, J.Y.; Kong, S.G. Intelligent visual surveillance—A survey. Int. J. Control. Autom. Syst. 2010, 8, 926–939. [Google Scholar] [CrossRef]
- Räty, T.D. Survey on contemporary remote surveillance systems for public safety. IEEE Trans. Syst. Man Cybern. 2010, 40, 493–515. [Google Scholar] [CrossRef]
- Adam, G.; Garani, G.; Ventzas, D. FPGA design of a camera control system for road traffic monitoring. In Proceedings of the 6th International Conference from Scientific Computing to computational Engineering (6th IC-SCCE), Athens, Greece, 9–12 July 2014; Volume 1, pp. 191–197. [Google Scholar]
- Bellia, L.; Fragliasso, F.; Stefanizzi, E. Why are daylight-linked controls (DLCs) not so spread? A literature review. Build. Environ. 2016, 106, 301–312. [Google Scholar] [CrossRef]
- Doulos, L.T.; Tsangrassoulis, A.; Kontaxis, P.A.; Kontadakis, A.; Topalis, F.V. Harvesting daylight with LED or T5 fluorescent lamps? The role of Dimming. Energy Build. 2017, 140, 336–347. [Google Scholar] [CrossRef]
- Naveenkrishna, M.; Jayanthy, S. Beaglebone Black Webcam Server for Security. Int. J. Trends Eng. Technol. 2015, 5, 99–103. [Google Scholar]
- PadmaSai, Y.; Naveen Kumar, V.; Mohan Krishna, N. On-Board Camera Based on Pedestrian Detection system. Int. J. Adv. Res. Electr. Electron. Instrum. Eng. 2015, 4, 1315–1322. [Google Scholar]
- Kontaxis, P.A.; Bouroussis, C.A.; Doulos, L.T.; Topalis, F.V. Applications of CCD sensors in photometry and in daylight responsive systems. In Proceedings of the 5th Balkan Conference on Lighting (Balkan Light), Belgrade, Serbia, 3–6 October 2012; pp. 323–330. [Google Scholar]
- Guo, L.; Eloholma, M.; Halonen, L. Intelligent road lighting control systems—Overview and case study. Int. Rev. Electr. Eng. 2007, 2, 14–20. [Google Scholar]
- Grover, S.; Shankar Saxena, V.; Vatwani, T. Design of intelligent traffic control system using image segmentation. Int. J. Adv. Eng. Technol. 2014, 7, 1462–1469. [Google Scholar]
- Sarkar, A.; Mistrick, R. A novel lighting control system integrating high dynamic range imaging and DALI. Leukos 2006, 2, 307–322. [Google Scholar] [CrossRef]
- Sarkar, A.; Fairchild, M.; Salvaggio, C. Integrated daylight harvesting and occupancy detection using digital imaging. In Proceedings of the SPIE (International Society for Optical Engineering), Sensors, Cameras, and Systems for Industrial/Scientific Applications IX, San Jose, CA, USA, 29 February 2008; Volume 6816. [Google Scholar] [CrossRef]
- Newsham, G.; Arsenault, C. A camera as a sensor for lighting and shading control. Light. Res. Technol. 2009, 41, 143–163. [Google Scholar] [CrossRef]
- Carrillo, C.; Diaz-Dorado, E.; Cidrás, J.; Bouza-Pregal, A.; Falcón, P.; Fernández, A.; Álvarez-Sánchez, A. Lighting control system based on digital camera for energy saving in shop windows. Energy Build. 2013, 59, 143–151. [Google Scholar] [CrossRef]
- Bouroussis, C.A.; Kontaxis, P.A.; Topalis, F.V. Interior lighting control by daylight harvesting using a smart imaging sensor. In Proceedings of the 6th Balkan Conference on Lighting, (Balkan Light), Athens, Greece, 16–19 September 2015; pp. 197–204. [Google Scholar]
- Motamed, A.; Deschamps, L.; Scartezzini, J.-L. On-site monitoring and subjective comfort assessment of a sunshadings and electric lighting controller based on novel High Dynamic Range vision sensors. Energy Build. 2017, 149, 58–72. [Google Scholar] [CrossRef]
- Liu, H.; Zhou, Q.; Yang, J.; Jiang, T.; Liu, Z.; Li, J. Intelligent Luminance Control of Lighting Systems Based on Imaging Sensor Feedback. Sensors 2017, 17, 321. [Google Scholar] [CrossRef] [PubMed]
- Toufiq Imam, M.H.; Afshari, S.; Mishra, S. An experimental survey of feedback control methodologies for advanced lighting systems. Energy Build. 2016, 130, 600–612. [Google Scholar] [CrossRef]
- Pandharipande, A.; Caicedo, D. Smart indoor lighting systems with luminaire-based sensing: A review of lighting control approaches. Energy Build. 2015, 104, 369–377. [Google Scholar] [CrossRef]
- van de Meugheuvel, N.; Pandharipande, A.; Caicedo, D.; van den Hof, P. Distributed lighting control with daylight and occupancy adaptation. Energy Build. 2014, 75, 321–329. [Google Scholar] [CrossRef]
- Afshari, S.; Mishra, S.; Julius, A.; Lizarralde, F.; Wason, J.; Wen, J. Modeling and control of color tunable lighting systems. Energy Build. 2014, 68, 242–253. [Google Scholar] [CrossRef]
- Caicedo, D.; Pandharipande, A. Daylight and occupancy adaptive lighting control system: An iterative optimization approach. Light. Res. Technol. 2016, 48, 661–675. [Google Scholar] [CrossRef]
- Granderson, J.; Gaddam, V.; DiBartolomeo, D.; Li, X.; Rubinstein, F.; Das, S. Field-Measured Performance Evaluation of a Digital Daylighting System. Leukos 2010, 7, 85–101. [Google Scholar] [CrossRef]
- Li, D.H.W.; Cheung, A.C.K.; Chow, S.K.H.; Lee, E.W.M. Study of daylight data and lighting energy savings for atrium corridors with lighting dimming controls. Energy Build. 2014, 72, 457–464. [Google Scholar] [CrossRef]
- Bellia, L.; Cesarano, A.; Minichiello, F.; Sibilio, S. Setting up a CCD photometer for lighting research and design. Build. Environ. 2002, 37, 1099–1106. [Google Scholar] [CrossRef]
- Goovaerts, C.; Descamps, F.; Jacobs, V.A. Shading control strategy to avoid visual discomfort by using a low-cost camera: A field study of two cases. Build. Environ. 2017, 125, 26–38. [Google Scholar] [CrossRef]
- Kumar, S.; Kurian, C.P.; Varghese, S.G. High Dynamic Range Imaging system for Energy Optimization in Daylight—Artificial Light Integrated Scheme. Int. J. Renew. Energy Res. 2015, 5, 435–442. [Google Scholar]
- Doulos, L.; Tsangrassoulis, A.; Topalis, F. Quantifying energy savings in daylight responsive systems: The role of dimming electronic ballasts. Energy Build. 2008, 40, 36–50. [Google Scholar] [CrossRef]
- Djnnings, J.; Rubinstein, F.; Dibartolomeo, D.; Blanc, S. Comparison of control options in private offices in an advanced lighting controls testbed. J. Illum. Eng. Soc. 2000, 29, 39–55. [Google Scholar] [CrossRef]
- Topalis, F.V.; Doulos, L.T. Ambient Light Sensor Integration (Book Chapter), Handbook of Advanced Lighting Technology; Springer: Cham, Switzerland, 2017; pp. 607–634. [Google Scholar]
- Doulos, L.; Tsangrassoulis, A.; Topalis, F. Multi-criteria decision analysis to select the optimum position and proper field of view of a photosensor. Energy Convers. Manag. 2014, 86, 1069–1077. [Google Scholar] [CrossRef]
- Mistrick, R.; Thongtipaya, J. Analysis of daylight photocell placement and view in a small office. J. Illum. Eng. Soc. 1997, 26, 150–160. [Google Scholar] [CrossRef]
- Yun, S.-I.; KiSky, K.-S. Luminance Measurements Using CCD Camera and Comparisons with Calculation Models for Predicting Indoor Illuminance. Sustainability 2018, 10, 1556. [Google Scholar] [CrossRef]
- Doulos, L.; Tsangrassoulis, A.; Topalis, F. The role of spectral response of photosensors in daylight responsive systems. Energy Build. 2008, 40, 588–599. [Google Scholar] [CrossRef]
- Allied Vision Technologies GmbH AVT Prosilica Technical Manual. Available online: www.alliedvision.com (accessed on 1 September 2018).
- YF360A-2 FUJINON Panomorph Lens Product Brochure. Available online: http://www.fujifilm.eu (accessed on 1 September 2018).
- BeagleBone Black System Reference Manual Revision C1. Available online: http://www.ti.com/tool/beaglebk (accessed on 1 September 2018).
- Pradeep Kumar, M.; Lokesha, H. Real Time Implementation of Computer Vision Algorithms on Beagleboard. IOSR J. VLSI Signal Process. 2014, 4, 1–6. [Google Scholar] [CrossRef]
- Mathew, N.; Prabhakar, S.; Gerard Joe Nigel, K. Certain Approaches of Real Time Object Tracking in Video Sequences on Embedded Linux Platform. Int. J. Innov. Technol. Explor. Eng. 2013, 2, 102–105. [Google Scholar]
- Hein, P.F. DALI-a digital addressable lighting interface for lighting electronics. In Proceedings of the 2001 IEEE Industry Applications Conference, Thirty-Sixth IAS Annual Meeting, Chicago, IL, USA, 30 September–4 October 2001; Volume 2, pp. 901–905. [Google Scholar] [CrossRef]
- IEC 62386-201: Digital Addressable Lighting Interface; International Standard, International Electrotechnical Commission: Geneva, Switzerland, 27 May 2015.
- Haq, M.A.; Hassan, M.Y.; Abdullah, H.; Rahman, H.A.; Abdullah, M.P.; Hussin, F.; Said, D.M. A review on lighting control technologies in commercial buildings, their performance and affecting factors. Renew. Sustain. Energy Rev. 2014, 33, 268–279. [Google Scholar] [CrossRef]
- Wang, S.C.; Liu, Y.H.; Chen, Y.L.; Chen, J.Y. Development of DALI-based electronic ballast with energy saving control for ultraviolet lamps. In Proceedings of the 8th IEEE International Conference on Industrial Informatics, Osaka, Japan, 13–16 July 2010; pp. 214–219. [Google Scholar] [CrossRef]
- Roth, P.; Winter, M. Survey of Appearance-Based Methods for Object Recognition; ICG-TR-01/08; Institute for Computer Graphics and Vision, Graz University of Technology: Graz, Austria, 2008. [Google Scholar]
- Adam, G.K.; Pappas, V.G. Geographical Image Processing Using Gis Tool. Int. J. Comput. Appl. 2004, 26, 126–131. [Google Scholar] [CrossRef]
- Standard CEN/TC 169/WG 11 Daylight in Building; DIN Standards Committee: Berlin, Germany, 15 July 2016.










| System | Power (W) | Total Power (W) |
|---|---|---|
| Typical photosensor | 0.96 | 0.96 |
| Camera | 2.03 | 3.67 |
| Microcontroler | 1.64 |
| Lighting System with Fluorescent Lamps | Lighting System with LEDs | |||||
|---|---|---|---|---|---|---|
| Lighting Control System | Power at Full Light Output (W) | Power at 50% Light Output (W) | Energy Savings (%) | Power at Full Light Output (W) | Power at 50% Light Output (W) | Energy Savings (%) |
| Typical Photosensor | 1153 | 577 | 49.96 | 641 | 321 | 49.92 |
| Microcontroller with CCD Camera * | 1155.67 | 579.67 | 49.84 | 643.67 | 323.67 | 49.71 |
© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Adam, G.K.; Kontaxis, P.A.; Doulos, L.T.; Madias, E.-N.D.; Bouroussis, C.A.; Topalis, F.V. Embedded Microcontroller with a CCD Camera as a Digital Lighting Control System. Electronics 2019, 8, 33. https://doi.org/10.3390/electronics8010033
Adam GK, Kontaxis PA, Doulos LT, Madias E-ND, Bouroussis CA, Topalis FV. Embedded Microcontroller with a CCD Camera as a Digital Lighting Control System. Electronics. 2019; 8(1):33. https://doi.org/10.3390/electronics8010033
Chicago/Turabian StyleAdam, George K., Panagiotis A. Kontaxis, Lambros T. Doulos, Evangelos-Nikolaos D. Madias, Constantinos A. Bouroussis, and Frangiskos V. Topalis. 2019. "Embedded Microcontroller with a CCD Camera as a Digital Lighting Control System" Electronics 8, no. 1: 33. https://doi.org/10.3390/electronics8010033
APA StyleAdam, G. K., Kontaxis, P. A., Doulos, L. T., Madias, E.-N. D., Bouroussis, C. A., & Topalis, F. V. (2019). Embedded Microcontroller with a CCD Camera as a Digital Lighting Control System. Electronics, 8(1), 33. https://doi.org/10.3390/electronics8010033

