Archive for the ‘Software Engineering’ Category

Artificial Vision/ Smart Vision

September 10, 2009

Problem Definition:

And will the sun ever shine
In the blind man’s eyes … [Micheal Jackson Album Invincible 2001]

Vision is the greatest blessing on earth. For visually impaired people commute is a tough job. People even with vision need navigators to guide them to move around. Visually impaired usually walk with white stick or dogs which by no means are intelligent the way we use our navigation. There is a need of a system which may help blinds to commute freely, easily and fearlessly. This system is by no means a system of The vOICe, Bionic eyes or brain implants to generate artificial vision. [ http://www.artificialvision.com/etumble.htm]

Objectives:

1. System will actually be a navigator for visually impaired people.
2. System will along with mapping and navigation will also guide walk through roads or tracks.
3. System must have to be effective, reliable, extensive with all possibilities to help blinds to walk, use public transport, go to restaurants, find places.
4. System will work using camera, gps, digital compass, Internet/WIFI, headphones, mic, mobile, may be blue tooth and intelligent software that will utilize these hardware to accomplish smart vision.
5. System may help recognize people just like TED Sixth sense. To help blinds to meet people outside.
6. System must guide the person while walking, finding places, guiding about roads directions and obstacles on the way, recalculating path.
7. System must be easy to use and light weight.
8. System must be kind of spectacles with camera, and attached headphones and mic.
9. User will communicate/instruct the system through voice and there may be a small console with keys or may a duped with sensors and keys.
10. System must alert the user about weather, emergency situations, road traffic, fire and other dangerous circumstances.
11. System must be an assistant like dogs but much more intelligent and aware of surroundings.
12. System must allow user to manage their profiles and configure their preferences using desktop machines.

Creative Commons License
Artificial Vision/ Smart Vision by Rehan Munir [Ryanwyan, renny, rennywenny, Renz] is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License.

Annotate Coding

November 14, 2007

More or less with new task assigned we have to face new challenges. Especially we start thinking about questions who, what, why, how to solve problems. Recently I have been assigned a new task and I was getting troubled with questions who, what, why, how. I tried on my writing pad to figure out the solution. Sometimes we have all the resuable functions written and we need to integrate new modules/ features. But if things are tricky you need to think 100 times to get possible workable solution. I figured out a way at the verge when my nerves get frayed is to write pseudo-code in comments form so, i started commenting the code which yet not conceived, and talking with myself now this now that and all that I got is below:
load_note: function(note_id){
// get selected node
// has sub_nodes
// IS node expanded
// select notes modules
// if notes is expanded{
// select specified note}
// else get_notes{
// select specified note}
// get submodules
//select notes
// get all notes
// select specified notes
}

and got the desired solution

select_and_expand_node: function(node){
if(node != null){
if(node.get_has_children()){
if(!node.get_is_expanded()){
node.on_toggle();
}
}
else{
node.on_toggle();
this.get_nodes_data(node, this);
}
}
}

load_note: function(note_id){
var notes_module_node = null;
var selected_node = tree_view_ctrl.get_selected_node();
if(selected_node != null){
this.select_and_expand_node(selected_node);
notes_module_node = selected_node.search_node(‘Notes’);
if(notes_module_node != null){
this.select_and_expand_node(notes_module_node);
notes_module_node.search_node_database_id(note_id);
………
}
}
}
now it gave me pretty much idea of how to accomplish the desired functionality. I added more comments, more checks and figured out some repetitive code and created another function and in the end I got my way to solve the problem in less time.
Adding comments is another sub-task of developing nice code, which I sometimes hate why not I make function-names and variables-names so understandable to avoid commenting code no doubts there be pieces of code where commenting is inevitable but we can avoid as much as possible.
Try it…

Creative Commons License
Annotate Coding by Rehan Munir is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.