Community Profile

# Image Analyst

29,012 total contributions since 2010

Senior Scientist and Inventor in one of the world's 10 largest industrial corporations doing image analysis full time. Ph.D. in Optical Sciences specializing in imaging, image processing, and image analysis. 40+ years of military, academic, and (mostly) industrial experience with image analysis programming and algorithm development. Experience designing custom light booths and other imaging systems. Experience with color and monochrome imaging, video analysis, thermal, ultraviolet, hyperspectral, CT, MRI, radiography, profilometry, microscopy, NIR and Raman spectroscopy, etc. on a huge variety of subjects. Be sure to click "View All" in my File Exchange to see ALL of my demos and tutorials: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862

Professional Interests: Image analysis and processing

View details...

Contributions in
View by

Naming Variables in Matlab
That is a horrible idea. See the FAQ to find out why.

19 hours ago | 0

Change file names before saving
Try this: %% message = sprintf('Would you like to crop out and save each individual images?'); reply = questdlg(message, 'Ext...

20 hours ago | 0

Counting occurences of each number in a column when it's equal to all numbers in the same line?
Try this: P=[1 2 3 2 2 2 3 3 3 4 4 1 4 4 4 2 2 2 1 4 2]; allTheSame = P(:, 1) == P(:, 2) & P(:, 1) == P(:, 3) % Rows whe...

22 hours ago | 0

Hazy image equation implementation.
Chances are that your image is floating point and you forgot to put [] in imshow. imshow(yourImage, []);

22 hours ago | 0

making video with Network
VideoWriter() has a 'FrameRate' option that you can specify to control how fast it playback.

22 hours ago | 0

| accepted

Connecting dots with straight line in a loop.
It seems that no one is exactly sure what you want to do, since the super obvious plot(x,y,'b-') doesn't seem to be it. So I'll...

23 hours ago | 0

how i can convert struct to matrix
You'd do this: st = load('mat_str.mat') f1 = vertcat(st.s.f1) f2 = cat(3, st.s.f2)

1 day ago | 0

Extract values from image
You can simply use improfile() [cx,cy,c] = improfile(I,xi,yi,n) xi are the line endpoints x values. yi are the endpoints y va...

1 day ago | 1

Plotting a quarter wave
Hint: x1 = linspace(-2, 0, 200); x2 = linspace(0, 1, 100); y1 = 4 * ones(1, 200) You should be able to figure out how to com...

1 day ago | 0

ReductionLevel is only an option for JPG images, not PNG images. 6000x8000 is not really that huge. How long does it ake to re...

1 day ago | 0

I want to do the same action to every files(.png) in one folder, but I face some problem.
Try the padarray() function. Or if you want to do it by indexing: baseFileName = files(i).name ; b=imread(baseFileNam...

2 days ago | 0

| accepted

Using Subplot in matlab
Try this: x = linspace(1, 10, 500); y = sin(x) ./ x; subplot(2, 2, 1); plot(x, y, 'b-', 'LineWidth', 2); grid on; subplot(...

2 days ago | 0

| accepted

I have problem writing a matlab function
Make sure x1 and x2 are column vectors (Nx1), NOT row vectors (1xN).

2 days ago | 0

how can I limit the search for kNN (fitcknn) if I have multiple classes in training but just want to compare the distance to few classes
Only pass in the columns you want, like pTrain = movs(:, [1,4]); % Extract only bending and walking columns. testData = movs(:...

2 days ago | 0

how to eliminate undesidered lines
It looks like the last point is the same as the first. You could just plot all except the last point: plot(x(end-1), y(end-1),...

2 days ago | 0

read text file and put its values in a vector

3 days ago | 0

Interpolation of a set of x , y data to a curve
Start by running my spline demo. Adapt as needed.

3 days ago | 0

| accepted

if condition problem and positive condition
You separated the else and the if. It should be elseif (one word) but actually you don't even need it. Try this: if n1 <= ee1...

3 days ago | 0

| accepted

Find the orientation of each arbitrary object in an image
You can use regionprops to get shape info. One nice one is the circularity. If you want stick-like objects, you do props = re...

3 days ago | 0

which tool boxes is required for image processing and simulation
The Image Processing Toolbox. Many simulations can be done without any toolboxes at all - just depends on what you want to simu...

4 days ago | 0

| accepted

How can I perform image analysis only within object's boundary?
superpixels() gives you a labeled image. You can get a mask for a particular boundary by passing the labeled image into ismembe...

4 days ago | 0

disp gives wrong format
Try fprintf() instead of disp(): fprintf('%6.2f, %9.6f\n', [t; s]); With fprintf() you can get exactly the appearance you w...

4 days ago | 0

Create image from an Image
Sum the image horizontally. Untested code: verticalProfile = sum(rgbImage(:,:,3), 2); % Collapse across columns. % Then find ...

6 days ago | 1

| accepted

Measure vertical distance using loop function
You cannot find that distance(s) because the location of the "kink" between surface 1 and 2 is not specified. If it were moved ...

6 days ago | 0

binary image to matrix of 10 by 5 matrix
Not sure what this means - what does 8 pixels have to do with anything. To convert your binary image to a size of 10 by 5, use ...

6 days ago | 0

Image Processing Distance Measurement
Try (untested) % extracting the red channel redChannel = rgbImage(:,:,1); [rows, columns] = size(redChannel) % then threshol...

6 days ago | 1

Why my coding keep running non stop?
A common bug that Walter mentioned is an infinite loop caused by not having an iteration limit on a while loop so that the while...

7 days ago | 0

How to create empty matrix in matlab?
Try making a 3-D matrix allImages = zeros(64, 64, 100, 'uint8'); % or whatever class they are. for slice = 1 : 100 thisSl...

7 days ago | 0

How can I extract the frame around the windows?
I suggest you just call rbbox(), imrect(), or imcrop() for the simplest solution. Anything else is not going to be "basic".

8 days ago | 0

| accepted