Matrix from Image
fay.tor
Fist I am really a beginner in IgorPro! I have a picture from which I can get the table up here is fine.
My question is how this can I transorme this table to a matrix and after multiply by another matrix?
Thnx for your help
So, if your wave is named myMatrix, you can do something like:
myMatrix = myMatrix * 5
If you do this, it's possible that the image that is displayed might not appear to change. This would depend on how Igor is translating the numerical values at each point in the wave into pixel intensity values. But if you are displaying your wave in a table you should see that the value at each point has changed.
If you're really new to Igor, I strongly suggest that you go through the guided tour. Select Help->Getting started. Taking the guided tour will almost certainly save you time, since it will introduce you to almost all of the important concepts in Igor that new users sometimes get tripped up on.
April 15, 2009 at 08:58 am - Permalink
Yes indeed the operation you have given me I know how the do it ( myMatrix = myMatrix * 5).
But the problem is that I want to multiply two matrixs, while I have two tables !!
if I make the operation myImage3 = myImage1 * myImage2 does not work its not a matrix multiplication
PS: I'm using IgorPro 5.05 and in the Help ther is no "Getting started"
April 16, 2009 at 01:21 am - Permalink
Hm...I guess I'm not sure what you mean by "matrix multiplication" then. You might want to provide a simplified example of what you are trying to do so that we can help you better. Also, for matrix operations, check the command help for the
MatrixOp
operation. That may have what you want.Oh. Well, it's there in 6.10, which is what I'm using, though I'm pretty sure 5.05 comes with the guided tutorial help file, though maybe there just isn't a menu item for it. You should be able to access it by choosing Help->Igor Help Browser. Then choose the "Help Topics" tab. On the left side, from the select menu labeled "Show topics from", choose "Getting Started.ihf". Then, from the middle window, double click on "Getting Started".
April 16, 2009 at 04:08 am - Permalink
What i want to do is a macro to ivert a image. So from my image I can extract a matrix (MxN), multiplay this matrix by an other "Invert" from image olso
-------- 0 0 1
Invert = 0 1 0
-------- 1 0 0
And sory for my English :-(
April 16, 2009 at 05:40 am - Permalink
It has been about 15 years since I have needed to use matrix math, so I may not be the best person to help on this question.
But from looking at the command help for the
MatrixOp
operation, I see that it can calculate the inverse of a matrix usingInv(matrixA)
. There is also theMatrixMultiply
operation.You might also take a look at the
ImageTransform
operation, which has aninvert
keyword that may be of use to you.Finally, there is a section in a help file about matrix math, which might provide some useful examples that give you an idea of how to do what you are trying to do. To view this section, execute the following command from the Igor command line:
Hopefully these operations I mention all exist in the version you are using. If not, you can download a demo version of Igor 6 from http://www.wavemetrics.com/support/demos.htm that is fully functional for 30 days.
April 16, 2009 at 07:04 am - Permalink
This operation DisplayHelpTopic "Matrix Math" is available in my version olso
thanks a lot again
April 16, 2009 at 08:21 am - Permalink
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
April 16, 2009 at 04:18 pm - Permalink
I found the solution,
Using MatrixMultiply Image1, Image2 and the result appears in M_product
Thanks a lot
April 21, 2009 at 09:28 am - Permalink