使用一般常見的而且容易獲得的網路攝影機(Webcam),經由電腦PC端的人機介面與整體的系統整合,擷取背景影像和目前影像。將擷取到的影像從RGB色彩空間轉換至HSL色彩空間,在HSL色彩空間中利用簡單的影像處理─影像相減,再經過邏輯判斷,得到人或是物體在空間中的定位和背景影像與目前影像之間的亮度差。 定位出來的結果提供空調出風口的馬達旋轉依據,控制風向指向空間中的人,使其達到冷卻效果並讓人感受到舒適。 影像之間的亮度差異經過程式判斷決定室內光源亮度的增減,編碼後藉由串列通訊(RS-232通訊介面),將訊號傳至微控制器(8051單晶片),經過控制器解碼與判斷,對室內照明光源(LED光源)提供PWM (Pulse-width modulation 脈衝寬度調變)訊號,以調整室內光源,避免不必要的燈光或是太過明亮、灰暗的環境。經過以上的程序,使空間的溫度與亮度達到人體感受較為舒適地的狀態,並且減少不必要的能源消耗。 利用本系統的多網路攝影機,建立一人追跡,能對於只有一人在空間時,進行追蹤並調控燈光和空調的配置達到節能。 Webcam is common and easy to use now. Use it to capture the background image and current image on HMI (Human Machine Interface) which is based on PC. Transform the image from RGB color model to HSL color model. Use the simple image processing – image subtraction and logic operator judgment to get the location of people or object in the room and the difference in lightness. The location provide a basis to the motors which rotate the air-condition vent to the people in the room for cooling as the target. Through the program determining the lightness of indoor lamp (LED) to increase or decrease by the difference in lightness and encode it. Then it transmits the code to microcontroller which decodes and exports PWM (Pulse-width modulation) signal to indoor lamp by serial communication (RS-232). After adjusting the lightness, we can avoid the lightness too bright or too dark and turn on the unnecessary indoor lamp. By the above methods, we can make the room to reach a comfortable temperature and lightness , so that we can decrease unnecessary energy consumption. Use multiple webcams to track one people and control above to save energy.