In industrial and public safety applications, detecting hazardous situations in a timely manner is critical for averting accidents and maintaining human safety. This work offers a novel method for identifying dangerous environments by using cutting-edge image processing algorithms. Using sophisticated image processing algorithms, the technology extracts pertinent information from visual data that is recorded by cameras or other sensors. Gas sensors are simultaneously used to track the chemical composition of the surrounding air, with a special emphasis on chemicals that may pose a threat. The integration of gas and optical sensor data allows for a more thorough analysis, which enhances the system's precision in identifying and categorizing dangerous situations.