I am very interested in using JMP to do automatic image processing and analysis and I have a script ( heavily based on John Pontes add-in - and information gathered from his excellent blog John Ponte, Author at JMP Blog) that I can run on one image at a time on images but what I really want to do next is to create a 'looping' script that does the following
- counts the number of .jpg files in a directory.
- one-by-one opens an image, puts the information available ( I'm using John Pontes Image analyser add-in and script for this) into a data table
- does a basic analysis ( mean of columns & rows etc.)
- saves this with the jpg filename
- closes the files down and moves onto the next image.
I have a number of small problems with this but the main ones are that when I use the following
For( i = 1, i <= N Items( files ), i++,
If( Ends With( files[i], ".jpg" ),
Open( files[i] );
);
the open ( files); opens the jpg files in another program ( the default prog that I don't want to change). How do I get it so that it opens up in JMP using the following ( or something else if it's better)
img = New Image( "thefilenameofthe.jpg" );
w = New Window( "image", img );
I can then perform the analysis and close this all down and loop back around until all of the images have been analysed.
[*Edit to original post by staff member sseligman. Second part of user question added here to original post.]
Many apologies, I wasn't clear enough in my original post. What I want to do is to put the pixel information into a data table, not the original image itself.
this is, in effect, automating the ImageToDatatable JSL script that has already been written but go through each image within a folder and save the resulting data table with any resultant analysis of the pixels in the same folder.
the x & y co-ordinates along with the RGB, I and HSL are sufficient for me to carry out any analysis I require. I have attached an example data table that I can perform analysis on, I have also attached the original image where this data was taken from, I have a few thousand of these which I need to go through so doing them one at a time would be nearly impossible.
apologies again for the bad wording and lack of clarity in the original post.
Regards
David