Here is what I want to do or get it done (since I am not a embedded
Welcome to the world of embedded... things. I highly appreciate your interest in the embedded world, after all it's more interesting as just PC things :)
- create a prototype with Arduino to detect open window/door of my room
You've come to the right place, Arduino (embedded stuff) is very good at input/output. And that seems like a fun project!
using camera(image processing/object state detection)?
Wait, where did this come from? Humans are good at observing, their main sense would be vision (I guess?) to do so. Microcontrollers are somewhat better at logic signals. They are good at taking sensor signals and turning them into whatever you like.
There is a possibility you'd just like to do something with image processing/detection. If so, please mention that :)
- that prototype will take pictures of room door/window at certain interval and than using some algorithm to decide whether they are open
or not and will sound an alarm if it is open.
Arduino can read out a simple "Door sensor" and check if the door is, or is not closed. This will both shrink your project and make it easier.
Arduino can sound an alarm. You can even add a keypad (for a disable code).
- prototype should work in dark as well
The drawback of human vision. Is that it does not work so well in the dark. Sensor's based on the touch of the door or a magnetic contact on the door are not affected by darkness.
If your sensor won't fail, the alarm won't go off by accident :)
- Form factor should be small (the final product should not be bigger than smoke detectors that we have it in our room)
Use an arduino nano or micro.
My questions are..
- Is it possible? :)
Yup! You can check for existing projects on the web. You can put in your own implementation though.
- What all things I need to create a prototype?
Whatever you need is what you will need.
An sensor as input, an arduino to process it and an "alarm".
There are a trillion configurations for this, you can choose to just go by one or check what fits your needs best.
- Which camera should I use? Camera should be really small.
Unless you really want to get going with camera detection/object tracking, you shouldn't use one. (Especially with arduino it can be quite frustrating.) You should use a PC or raspberry Pi or Android phone.
Or use arduino with said sensor.
- Are algorithms available to detect it?
Yes. For this, it's again application specific. You should check out some resources, check what others use and determine what would work best for you. Try it out and if it won't work you can ask it :) (probably on normal stack-overflow since it's not really arduino related, maybe robotics stackexchange).