LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-10-2016, 11:48 AM   #1
aquamarine
LQ Newbie
 
Registered: Feb 2011
Posts: 29

Rep: Reputation: 0
Fire Detection program for thermal imaging camera


Hi,
I am newbie and trying to write a source code for fire detection system for a thermal imaging IP camera.
I need help for writing a program in visual studio or in Eclipse for the said purpose.
if any body have an idea or source code in which he detect fire and alarm for thermal imaging IP camera then please let me know. I shall be very thankful to you.

Regards

Last edited by aquamarine; 08-10-2016 at 11:49 AM.
 
Old 08-11-2016, 08:51 AM   #2
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 445

Rep: Reputation: 115Reputation: 115
visual studio isn't exactly linux-software, but I found when trying to detect fire with an infra-red sensitive camera, that providing the camera is not exposed to sunlight or other direct heat sources or reflectors, then if the camera has auto-brighness control built in, any flames are usually completely saturated in an image. you can do image threshholding, then look for "white" pixels. imagemagick and some scripting can do this for you. (it is available cross platform, but I have only used in in linux.)
convert imagename.jpg -threshold 98% jpg:- |stream -map i -storge-type char jpg:- -|detect_saturated_pixel
works, where detect_saturated_pixel is a binary that reads stdin and prints a message if a saturated pixel (255) is found. you will need to adjust the thresholding, and you will have to write the detect_saturated_pixel program yourself, but my own version is less than 30 lines long, so it isn't too hard.
you may have to mask part of the picture, and that can be done using imagemagick commands as well.
If your thermal camera has calibrated fixed exposure, you should be able to find out the temperature that a pixel brightness indicates, and then decide what is "fire" and what is not using that. That is even easier. Just bear in mind my comments about the sun and sunlight. That will max out any camera sensor as the sun is very hot :-)
 
Old 08-12-2016, 11:00 AM   #3
aquamarine
LQ Newbie
 
Registered: Feb 2011
Posts: 29

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by timsoft View Post
visual studio isn't exactly linux-software, but I found when trying to detect fire with an infra-red sensitive camera, that providing the camera is not exposed to sunlight or other direct heat sources or reflectors, then if the camera has auto-brighness control built in, any flames are usually completely saturated in an image. you can do image threshholding, then look for "white" pixels. imagemagick and some scripting can do this for you. (it is available cross platform, but I have only used in in linux.)
convert imagename.jpg -threshold 98% jpg:- |stream -map i -storge-type char jpg:- -|detect_saturated_pixel
works, where detect_saturated_pixel is a binary that reads stdin and prints a message if a saturated pixel (255) is found. you will need to adjust the thresholding, and you will have to write the detect_saturated_pixel program yourself, but my own version is less than 30 lines long, so it isn't too hard.
you may have to mask part of the picture, and that can be done using imagemagick commands as well.
If your thermal camera has calibrated fixed exposure, you should be able to find out the temperature that a pixel brightness indicates, and then decide what is "fire" and what is not using that. That is even easier. Just bear in mind my comments about the sun and sunlight. That will max out any camera sensor as the sun is very hot :-)
Thank you for your reply and Sorry for miscommunication e.g. visual studio.
Actually i need some help for writing the said program. A software which detect fire using a thermal image IP camera and play Alarm. this is my objective. I have a thermal image camera, its range is 6km. I need software code either in Visual studio (windows based) or any other language in other OS e.g Linux etc..
Thanks
 
Old 08-12-2016, 12:33 PM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,404
Blog Entries: 13

Rep: Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495
Quote:
Originally Posted by aquamarine View Post
Thank you for your reply and Sorry for miscommunication e.g. visual studio.
Actually i need some help for writing the said program. A software which detect fire using a thermal image IP camera and play Alarm. this is my objective. I have a thermal image camera, its range is 6km. I need software code either in Visual studio (windows based) or any other language in other OS e.g Linux etc..
Thanks
People here will help you to accomplish writing this code; however you need to recognize a few things. First you are saying you have no code and just want example code. Please perform a web search. Given that the purpose of this code is somewhat unusual, you may have to search for similar techniques and then modify the code you do find to be adapted for what you want it to do. If you illustrate that you've done some of your own code, people will be more willing to offer suggestions to how to continue with your project.

Next, you describe what you want it to do. It sounds very open-ended, and unclear, meanwhile it sounds interesting and very involved. To me, if this was an actual project where I'd be quoting it, I'd want to see a product requirements specification. If the asking person did not have any requirements document I'd volunteer to work with them to derive that document before implementing their request, because one never knows how those requirements may change.

Only you know how critical this project is. For instance if it is a product you envision and wish to make money with, if it is a school project where you wish to excel at, or if it is just personal exploration which you wish to perform. For any of those cases though, you really should be putting in sufficient effort on your own to define what you want and then attempting to implement what you want versus asking for pure hand-outs. If you know now that you are incapable of the high level of development that such a project may require, then you ought to be prepared to seek funding and assistance where you invest time and money to get this project accomplished.
 
1 members found this post helpful.
Old 08-12-2016, 12:40 PM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 24,172

Rep: Reputation: 7122Reputation: 7122Reputation: 7122Reputation: 7122Reputation: 7122Reputation: 7122Reputation: 7122Reputation: 7122Reputation: 7122Reputation: 7122Reputation: 7122
And to add to what rtmistler said, unless this is for a school assignment/demo project, it would be near impossible to implement in the real world as an accurate alarm. For example, localized heat sources (stoves? hot-plates? coffee makers?) will set it off. How about duration of the heat source? Someone lighting a cigarette? A candle? False-positive. While you can give it very broad parameters as a demo, the 'smarts' you'd have to put in the box in the real-world would make it HUGELY expensive, and require a good amount of user setup.
 
Old 08-12-2016, 05:22 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,531

Rep: Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622
have a look at OpenCV
http://opencv.org/
there are a ton of already done things and in many languages
ranging from c,c++ to matlab and python
 
Old 08-12-2016, 06:15 PM   #7
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 445

Rep: Reputation: 115Reputation: 115
I have a system which detects fire but it is only in a confined space (a boiler room) where the variables and factors are quite limited, and can be confused by bright lights in un-planned locations. For an outdoors project, it is a much more challenging job, and very well described by rtmistler. If this is a hobby application you can try simple thresh-holding, but for a commercial project it can get complex. see http://cordis.europa.eu/result/rcn/143051_en.html for complex, or for a camera that claims to do it all for you, http://vumii.com/fire-detection/
you haven't indicated if the camera will be moving or stationary, and taking stills or video, all of which affect your options. You also haven't said how proficient you are at c/c++ programming which is likely to be required if you are coding image processing yourself and want it to be quick.
If you are truly a newbie, I would try capturing images from the camera first, and then go from there. Break down the project into smaller parts which you can manage, but expect to do a lot of learning and coding. often it takes time learning one approach, only to find it will not do what you want for your parameters. no-one can do that research for you, but experience will be gained by going through the process, and you will become more realistic in your expectations of yourself, and have learned about a bunch of different systems as well by the time you finish.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: ServersCheck's Thermal Imaging Camera Sensor LXer Syndicated Linux News 0 05-25-2016 08:41 AM
LXer: See infrared in Android with the Seek Thermal Camera LXer Syndicated Linux News 0 10-17-2014 07:06 PM
Imaging Source USB camera help theoldgrommit Linux - Newbie 11 12-09-2013 04:13 AM
Camera Detection (Gnome) carlosinfl Linux - Hardware 1 06-06-2006 03:57 PM
Total recovery: Which program? ghost4linux, YaST2? Best drive imaging program? lagu2653 Linux - Software 1 06-20-2005 01:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration