dcg Posted February 18, 2011 Report Share Posted February 18, 2011 Hello I am currently developing a project using labview to track the sun using a camera. The camera will acquire an image of a shadow of a line cast by the sun on a screen much like a sun dial. My problem is coming up with an algorithm that will measure the line and relay coordinates back to my program where two stepper motors will move the solar panels into a better position. I have tried using NI Vision assistant but am new to it. The camera that I will be using is a Bosch Dinion LTC0445 camera connected to a PCI chasis. I have attached an example image of what the camera will be taking. Thank you dcg Link to comment
Tim_S Posted February 18, 2011 Report Share Posted February 18, 2011 My problem is coming up with an algorithm that will measure the line and relay coordinates back to my program where two stepper motors will move the solar panels into a better position. I recommend taking an actual image (really a set of images) and trying to evaluate each one. You're going to wind up using filters to process the image so you can get rid of the extraneous and measure what you're looking for. Posting code of what you've tried will provide more fruit as it shows you've at least tried something. Tim Link to comment
Jordan Kuehn Posted February 18, 2011 Report Share Posted February 18, 2011 post an actual image as well, and you may get some tips that relate directly to your application Link to comment
EricLarsen Posted February 18, 2011 Report Share Posted February 18, 2011 (edited) If this is a project to position solar arrays, do you really need to measure the sun's location? If you know the date, time of day and lat/long, it would be much easier to calculate position instead of trying to develop the hardware to measure location. If you're set on measuring location, like Tim said, take lots of pictures of your sun dial at various times of day and under various brightness conditions and start developing the algorithm using those. One thing your going to find challenging is the change in lighting conditons. When you start doing vision analysis, you'll find very quickly that consistent lighting is the most important part of capturing images. Since you're going to use natural lighting, as the brightness of the sun changes during the day, or due to cloud cover or seasonal changes, your lighting is going to very drastically and you'll need to be very clever in how you do your analysis. You will probably have to develop some kind of thresholding routine that changes as your lighting conditions change. Start by looking for the cross-hair shown in your picture. Set the threshold on your image so you can see that distinctly, then start looking for your sun dial shadow. You might have to make an assumption about where is should be based on time of day, and change the image threshold until you can find it. Edited February 18, 2011 by EricLarsen Link to comment
dcg Posted February 18, 2011 Author Report Share Posted February 18, 2011 Hello all Thank you very much for your replies. It is greatly appreciated. I am attempting to use the IMAQ magic wand tool . I understand what you are saying about the threshold levels when the light fades but my plan was to alter the treshold levels automatically using a LDR circuit. I have attached the vi I am working on. Just to let you know that there are some VI's missing because I do not have those modules downloaded on my laptop but they are on my PC at college. The image I posted ealier is representative of what I will be processing. I have been able to map the line in labview using the magic wand tool but am having difficulty interpreting the results. My plan was to take elements from a project that is a XY plotter that gets coordinates from the processed image and draws that image on paper, I know I am not drawing anything but the movement of the stepper motors is similar. Thanks again thres and wand.vi Link to comment
tushar Posted February 19, 2011 Report Share Posted February 19, 2011 Hello all Thank you very much for your replies. It is greatly appreciated. I am attempting to use the IMAQ magic wand tool . I understand what you are saying about the threshold levels when the light fades but my plan was to alter the treshold levels automatically using a LDR circuit. I have attached the vi I am working on. Just to let you know that there are some VI's missing because I do not have those modules downloaded on my laptop but they are on my PC at college. The image I posted ealier is representative of what I will be processing. I have been able to map the line in labview using the magic wand tool but am having difficulty interpreting the results. My plan was to take elements from a project that is a XY plotter that gets coordinates from the processed image and draws that image on paper, I know I am not drawing anything but the movement of the stepper motors is similar. Thanks again I think Eric has made one important point. the solution you are looking forward can give you better results if you CALCULATE the sun position instead of MEASURE the sun position. For calculating the position you will need to have GPS co-ordinates(you don't need to have GPS device, you can feed them as constants) of your location and time. Also consider following points when you consider vision based solutions Vs Time location based solution Accuracy (~100% Vs 100%) Cost of hardware cost of software development Cost of installation and commissioning maintainance (need to clean camera lens/ enclosure glass, calibrations etc.) etc. Also there is one more advantage of using time location based solution "It can even work in night" see this: http://pvcdrom.pveducation.org/SUNLIGHT/SUNPOS.HTM also Google a bit and you will get all the required formulas. Link to comment
ShaunR Posted February 20, 2011 Report Share Posted February 20, 2011 I think Eric has made one important point. the solution you are looking forward can give you better results if you CALCULATE the sun position instead of MEASURE the sun position. For calculating the position you will need to have GPS co-ordinates(you don't need to have GPS device, you can feed them as constants) of your location and time. Also consider following points when you consider vision based solutions Vs Time location based solution Accuracy (~100% Vs 100%) Cost of hardware cost of software development Cost of installation and commissioning maintainance (need to clean camera lens/ enclosure glass, calibrations etc.) etc. Also there is one more advantage of using time location based solution "It can even work in night" see this: http://pvcdrom.pvedu...IGHT/SUNPOS.HTM also Google a bit and you will get all the required formulas. Naaah. 4 LDR's (2 per axis) driving the motors in proportion to the difference in intensity. Doesn't get simpler (or cheaper) than that and is self calibrating for lighting levels (ok. I'll give you the night , but the device will be pointing at the ground since its tracking the sun ) But the OP wants to use a camera with a pencil stuck through a piece of paper. So I would suggest a concentric rake which will give you the position (quadrant) and length in 1 measurement. Link to comment
dcg Posted February 21, 2011 Author Report Share Posted February 21, 2011 Hello again Thank you for all your help. I know that the camera is not the ideal solution but I am doing this to get exposure to vision systems while doing my project. The LDR's are the best and easiest solution but my superviser wants more from the project. Bye Link to comment
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now