TSL 1401 lineScan
Alejo83
Posts: 28
Hi, I am just looking for help with TSL 1401 lineScan.
I am just want to know what is the piece of code the would display the width of an object as accurate as possible in inches.
Thank you so much!
I am just want to know what is the piece of code the would display the width of an object as accurate as possible in inches.
Thank you so much!
Comments
I am still no expert with the TSL 1401, but I did locate Parallax's resources for it. They recently changed their website. Are you having trouble locating that material?
http://www.parallax.com/search?search_api_views_fulltext=tsl1401
Since this is simply a camera with electronics, the issue of measuring inches requires knowing what is involved setting up the camera physically in a situation and calibrating it with items of known dimentions. A piece of code can provide a number to refer to, but not the calibration. That will require some trial and error on your part.
Code from Parallax tends to provide two services - a. to prove that the device is in good working order, and b., to demonstrate all the aspects of its basic use. There may be more useful info from the manufacturer, including Application Notes.
So, it takes identifying what is useful in what code is provided to get to an actual working application.
It looks like the manual. pdf provides what you need. Are you being overwhelmed by the literature? Maybe asking about particular pages will get more response.
I have my camera 4 inches distance from the object and I also installed a backlight.
The code that parallax provides is working fine and I can see in the debug terminal the 2 edges detected by the camera and it also shows that the object has an extend(width) of 20, I am assuming that 20 is refering to the pixels. Here is the thing, now how can I know that those 20 pixels are measuring the actual size of the object that is .3" width?
I am really thinking now in changing the method, I like the idea of connecting two opto-reflective sensors one next to each edge of the object. The object is 0.3" width and has a tolerance of .09", so if I install the opto reflective sensor's beam at a .09" distance from the object I think it can detect any change in the object's width and that would solve my problem.
Do you think this would work? I think It worth to give a shot to see the results knowing that the opto reflective is an inexpensive sensor!
To convert a pixel count to inches, you will have to calibrate your system against a known width standard. It is also important that the subject distance from the camera always remains the same. Otherwise the width will appear to change, i.e. closer will appear bigger; farther, smaller.
-Phil
They are a simpler sensor and may be quite adequate in your content. But it takes a technical person that is working with the actual situation to be able to say which is a better solution.
Nonetheless, it is much nicer to have two solutions to compare when management comes calling and wants to know if you have given them the best you can.
The opto-reflective use one wavelength of light, so they can be blind to some materials. You mentioned color variations in the product runs in your previous discussion. So I am uncertain that you would have to have a means to readjust sensitivity for changes in the product color. You may have to do this with either method. But one will show itself as being easier to manage.
Thank you Phil, you are right the setup is working perfectly and the distance from the camera to subject is fixed. Due that I am not very familiar with the terminology of this kind of topics(I still learning english as my second language) can you please describe to me what to mean to calibrate my system against a known width. It is the only part that I have left to get this done, measuring the width.
Thank you Phil again!
As you said the profile come in different colors(as 10 of them) but I don't mind to make a separate set up for each color, so in that way the guys only have to change the fix set up of each profile.
We will see later the results of this procedure and I will let you know how it did. Thank you so much for your help!
Thank you again for your help and have an amazing day!