Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

image processing

Good day,
I have a shot, 24 bits,  with oscillogram. I should work up the picture in such a way, to get the average position datas of this oscillogram. For the separate picture I realized it  in National Instruments Vision Assistant 7.1. in the following way:
1. File\Open Image
2. Color\Extract Color Planes\RGB - Red plane
3. Grayscale\Conversion\16 bit
4. Grayscale\Conversion\8 bit
5. Grayscale\Threshold\Manul Treshold (Threshold Values = 60)
6. Binary\Circle Detection - inscribes the circles into the oscillogram and shows the coordinates of the centres of these circles.
In attached files are vi, script and the cultivated image.
How can I realize this algorithm for this image but from .avi file? It means, I want to get after the cultivate of the picture some avarage coordinates of the oscillogram. The results should be joined to the table. How can I enter all findings datas in text file? In my file I can find only one point but in general I have 118 points. Please see vi circle line.vi and my be you can give me some advice.
Download All
0 Kudos
Message 1 of 7
(4,420 Views)
Hi Uhryap,
 
Thank you for contacting National Instruments!
 
Let me make sure that I understand your question.  You have this algorithm, as described by the steps in your post, that you want to run on the images within an .avi file.  Your .avi file has 118 images within it, and you want to run the specified algorithm 118 times.  You want the outputs from all 118 algorithms to then be formatted into a text document.  This is the understanding that I have.  Furthermore, you were able for this algorithm to run on a regular picture file, but now you are trying to port it to a .avi file!
 
Is this understanding correct?  Please respond in either the positive or negative and I will try and guide you in the right direction.  Also, feel free to expand in either direction. 
 
Respectfully,
0 Kudos
Message 2 of 7
(4,374 Views)

Hello. Thanks for your answer. Let me try to specify the task more precisely.There is oscillograph & web-camera, and using web-cam & virtual device (Grab and Save to AVI_NEW_codec_16bit.vi - in attachment) I'm saving video into the file. Video enclose the oscillogram, which we were taking from the oscillograph.It's length may be in the ranges from 1 second till 1 minute and the video may contain from 30 to 180 fps.We need to process the ..avi file, receive coordinates of the oscillogram and then write them in text file or .xls file.The question is how we can do it? I've developed the algorithm, which let me to work with single frame and to receive approximated coordinates. But it seems to me that there is a mistake in the algorithm.

And the answers on your questions are:

1) You have this algorithm, as described by the steps in your post, that you want to run on the images within an .avi file.? Yes, I want to run it on the images.

2) Your ...avi file has 118 images within it, and you want to run the specified algorithm 118 times? No, not 118 images have my avi file. If you will process Circle_line_new.vi picture 2.jpg (which I add), will get 118 or 117 circumferences which blended in ostsillogrammu and according to 118 or 117 co-ordinates of centers of circumferences.

3)You want the outputs from all 118 algorithms to then be formatted into a text document?Yes, I want that all of co-ordinates was written down in a text file or table with the proper indexes X and Y.

4)Furthermore, you were able for this algorithm to run on a regular picture file, but now you are trying to port it to a .avi file?Yes, you all understood correctly, I had tested the algorit on a picture, and now want to apply him to the avi file.

 

0 Kudos
Message 3 of 7
(4,346 Views)

You will look the file of Circle_line_super_new.vi (which I add) and process by him 2.jpg, on an output you will get co-ordinates X and Y, which are written down in a text file, now in Exel we build on these co-ordinates the graph (you will look Exel file which I add) and will compare the graph built in Exel from 2.jpg, that both as or does not a bit meet, but if mirror to reflect points relatively Y=250, or will turn out, that is needed. How it to correct? It would be desirable algorithm realized Circle_line_super_new.vi for a picture, to apply for an avi file. How it to do? Possibly, there is other approach for the decision of my task. It was very desirable to know that you on it say. And can be there are what to examples. Thank you for a help.

0 Kudos
Message 4 of 7
(4,343 Views)

For me did not turn out to fasten files. Therefore I lay out them on http://www.yousendit.com/ and give reference

http://www.yousendit.com/transfer.php?action=download&ufid=E41E7A0A153DFACA

0 Kudos
Message 5 of 7
(4,345 Views)

Hello Uhryap,

 

I had some problem retrieving your files from the link that you attached.  I have an alternative.  If you will zip up all of your files and place them on our ftp server, I will be able to access them very easily.  Just repost and let me know what the name of your zip file is on the following website:

 

ftp://ftp.ni.com/incoming

 

As for your application, it sounds as though you are taking images of an oscilloscope and using those images to process the data from that O-scope.  If that is the case, then one of my suggestions would be to pursue a serial or GPIB solution where you can pass the data directly into LabVIEW and process it there.  If this is a solution that you would be willing to consider, please post to that effect, and I can go into more detail.

 

As far as the solution that we are currently working on:  Once we get the algorithm working properly in LabVIEW / Vision Assistant, we should be able to open the AVI file and use a for loop to process each frame of that file.  Therefore, the transition from .jpg to .avi shouldn’t be the burden of this effort.  First, we need to get the algorithm running properly.  Once I can take a look at your code, I will have a better idea of what might be going wrong.

 

Respectfully,

0 Kudos
Message 6 of 7
(4,305 Views)

Hello. Thank you for answers. I laid out all of files about which I talked on ftp.ni.com/incoming/Uhryap.rar, you will forgive it old files, here reference on which it is needed to call on this reference of ftp.ni.com/incoming/Uhryap-2.rar. Your actions.

1.Open Circle_line_super_new_new.vi and will start him. Specify a picture which you want to process – it bude 2.jpg and specify the name of file co-ordinates will be saved in which

2.After treatment we got 118 circumferences which blended in our ostsillogrammu and to according to 118 co-ordinates.

3.Now open 2.jpg by a graphics editor and Exel-2.xls and will compare.

I would like, that an algorithm  is realized in Circle_line_super_new_new.vi mlzhno was to apply for an avi file.  How possibly, it to do? And as? If not possibly, I would like to hear, from you about GPIB solution. And in general, if it will be not difficult you, tell what GPIB solution.

Thank you once again and beg pardon for my English.

0 Kudos
Message 7 of 7
(4,260 Views)