cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Is there a fast way to analyze 100+ images in Mathcad?

naz_or
1-Visitor

Is there a fast way to analyze 100+ images in Mathcad?

Hello guys,

I would like to ask you if there is any tool in Mathcad that allows fast analysis of images? I have a set of couple of hunderds of photos describing a certain process. Each photo should be converted to a matrix and then some mathematical operations should be performed. I know how to do this one by one, but it is time consuming. Is there any option in mathcad to analyse .gif file type? Or any other easier and faster way?

Thanks!

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:naz_or)

Find attached a possible solution to your image processing automation (with thres=140 in absence of other information) and at the end an answer concerning your last question.

View solution in original post

7 REPLIES 7
Werner_E
25-Diamond I
(To:naz_or)

As you know how to do it with one pic you should post the worksheet here.

Its hard to give advice without knowing what you intend to do.

Generally spoken you would turn the operations you do on your pic into a single function dependent on the pic and then write a routine which takes all the pix in a directory or of a list and processes them automatically one by one.

PS: AFAIK Mathcad supports the GIF-format. Did you look at the E-book on Image Processing for information? I am assuming you are using Mathcad, not Prime!?

naz_or
1-Visitor
(To:Werner_E)

Here is the link that is related to single image processing (my post).

http://communities.ptc.com/message/198410#198410

I agree with you. It seems like only available possibility. I have one quick question: if i have a (x,y) data set, what function should i use in mathcad to expell all (x,y) pairs if x or y match/dont match certain criteria?

P.S. Yes, I am using Mathcad. I will look into image processing pack.

Thanks!

May be pictures from this article help you:

http://twt.mpei.ac.ru/ochkov/Mathcad-15/SolveImage.html

PS

Russian + Google translator = English/Сербский

Werner_E
25-Diamond I
(To:naz_or)

I wonder if you haven't worked on Richards file since then.

So the calculation on the pix you have in mind is binarizing and scaling the green-channel of the pic and the result is a n x 2 matrix containing the indices (you won't need the 255's).

So after the batch processing you would have 100+ of the kind of matrices, right? In which way you have in mind they should be presented?

Anyway - you can do as outlined above. Make a function with parameter filename - the reading of the green channel and the two matrix manipulations along with Richards XYZ_255 lines can alls be done in this function and the matrix then returned. Is thres dependable on pix size or 140 in any case?

For batch processing I would recommend to have the files named with a consecutive number (like SrO037.bmp) as it would be easier to acees them that way in a for loop (use num2str() function).

if i have a (x,y) data set, what function should i use in mathcad to expell all (x,y) pairs if x or y match/dont match certain criteria?

Can't think of a built-in function and you would have to specify what expel does mean. Are you after a submatrix of all (x,y) which match/don't match a specific criteria or are you going throughr your data set and want to trigger a specific calculation if a criteria is matched? In anycase you would have to write your own short routine to get what you want.

naz_or
1-Visitor
(To:Werner_E)

Thanks Werner,

Yes, after image processing I will have 100+ nx2 matrices. Just to make things more complicated, treshold is not always 140, so that additionally makes automation more difficult. Your explanation seems straightforward, however, I am afraid that I am not that skilled in Mathcad. As you said I will have to write me own routine, which means it will take some time. However, at this point, can you assist me this (x,y) dataset?

Lets say i have 5x2 matrix:

5, 11

0, 7

3.2, 4

0, 13

1, 4

I am interested in a function that will expell/delete all x,y pairs for which x value is 0 (or any other arbitrary value). So, the matrix becomes 3x2:

5, 11

3.2, 4

1, 4

How to do that in Mathcad?

Thanks

Werner_E
25-Diamond I
(To:naz_or)

Find attached a possible solution to your image processing automation (with thres=140 in absence of other information) and at the end an answer concerning your last question.

naz_or
1-Visitor
(To:Werner_E)

Thanks Werner, you really helped me a lot!!!

Announcements

Top Tags