Friday, June 22, 2012

OpenGL mini project on Traffic signal

Descriptions : As we know, the traffic signals direct the flow of traffic with the exemption of signals with turning arrows which should be compulsory in accord with each other.Traffic signals helps us to drive our vehicles in a safer manner lowering the risk of accidents, if properly followed.

In this Project simulation, we are implementing  Traffic Signal. We have three lights in the signal Red , Green and Orange. Each light have some meaning . Red means stop , Green means go, Orange means ready to go.
Same method we implemented in our project which used in real life .We have used this traffic signal in a cross road to avoid misshapening. When there is green signal it means vehicle can move or run on the road but if this green signal turnoff  and the red signal is turn on then its indicate the driver to stop his vehicle and same time signal allows some other side vehicle to cross the road. But if the vehicle is in the middle of cross or vehicle have cross the signal then there is no meaning of red light for the driver. When we press button R then red light will glow and all vehicles are stop n when we press Y button then  yellow light will glow and all vehicles ready to go .When  we press button G  green light will glow and then vehicle start  moving.  

In this project we have written a loadBMP function to load bitmap images. Bitmaps take up a lot of space compared to image formats, like .PNG, but I chose to use bitmaps because they are relatively easy to load into format that we need. Take a look at imageloader.h. This gives us the basic idea of what loadBMP does. (The actual code for loadBMP is in imageloader.cpp.) Given a filename, it returns an Image object, which contains the width and height of the image, as well as the array pixels, which stores the pixels' colors in the format we want. 


Usages : As mentioned above.

Download : Project code
                    road image
                    image loader.cpp
                    image loader.h

35 comments:

  1. I am not able to download the project code or any of the thing please help me

    ReplyDelete
  2. also if u have any related mini projects send me the link please it's argent

    ReplyDelete
  3. hw to run the program after downloadin the source code..der r three files??

    ReplyDelete
  4.  put all code in one folder with image and run them............

    ReplyDelete
  5. how  to combine all the 3 codes can u pls guide me

    ReplyDelete
  6. please send me the code for this

    ReplyDelete
  7. can you please help me sir...how can I download it???

    ReplyDelete
  8. click on download links and skip the ad at right top after 5 sec of count down and get i from box.com

    ReplyDelete
  9. source code for traffic signal is not executing so pls kindly help me...

    ReplyDelete
  10. sir its not running

    ReplyDelete
  11. it's run within my computer so it will run on ur's try to keep all code in one folder and run execute them

    ReplyDelete
  12. if u put them all in a folder it will surely work

    ReplyDelete
  13. @Rajeevkumarsingh:disqus how to see output???

    ReplyDelete
  14. noramly as you see the output of other program as usual

    ReplyDelete
  15. i have put all 3 files in one folder by name project1.. then if i execute imageloader.cpp then its showing like there is no such file or directory imageloader.h??? it will work for microsoft visual c++ 6.0 version no sir??

    ReplyDelete
  16. it work in microsoft visual c++ 6.0.
    Try to include in workspace all the files

    ReplyDelete
  17. what is workspace???why we need image loader.h and imageloader.cpp sir??because when i executed the programm all errors i got r related to image loader... so...

    ReplyDelete
  18. workspace is the all file in a project that is what.

    And all the file including imageloader.h and imageloader.cpp already in the download link. get it from there

    ReplyDelete
  19. sir microsoft visual c++ 6.0 is compatible on windows 7??

    ReplyDelete
  20. sir i have copied the imageloader .h in gl folder and i have given path for that folder in cpp but stil its not running what should i do now??

    ReplyDelete
  21. microsoft visual c++ 6.0 fully working in windows 7 as well as in vista and no wonder about xp

    ReplyDelete
  22. As said above

    ReplyDelete
  23. getting a linker error 2019 unresolved external symbol class image even after adding gluax.h and gluax.lib

    ReplyDelete
  24. sir in which path to add that folder after putting all files in single folder

    ReplyDelete
  25. sir..if we do not include imageloader.cpp programm we will not get the output sir???means that image loader.cpp programm where we should write??after main function??

    ReplyDelete
  26. if u don't want include the imageloader.cpp then just do as in normal c program

    ReplyDelete
  27. getting link referencing error after adding all files in one folder nd executing.. should we wanna add any link header files.

    ReplyDelete
  28. sir its not working ...we ll try that sir pls send me simple code of traffic signal as soon as possible pls rajeev sir

    ReplyDelete
  29. links are not working......

    ReplyDelete
  30. the link is not working sir and sir there is no " Captcha " Showing so that we can enter it

    ReplyDelete
  31. road image is not downloading wt to do???

    ReplyDelete
  32. sir please send me code of nuclear power plant demonstration........ sameer_kh100@yahoo.com

    ReplyDelete