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

Answered

How to loop around cumsum ?

Did you just want the sum of each column? Like this: columnSums = sum(Flux, 1);

How to loop around cumsum ?

Did you just want the sum of each column? Like this: columnSums = sum(Flux, 1);

6 hours ago | 0

Answered

not enough input argument error

If your function is called MyFunc() and it expects two variables, a 1x128 double vector and a single character, then you need to...

not enough input argument error

If your function is called MyFunc() and it expects two variables, a 1x128 double vector and a single character, then you need to...

7 hours ago | 0

Answered

How can I obtain my expected result?

fprintf() returns the number of characters printed, which is not what you want. What you want is this: function out = picker(c...

How can I obtain my expected result?

fprintf() returns the number of characters printed, which is not what you want. What you want is this: function out = picker(c...

1 day ago | 1

Answered

Blending interpolation for a function

Try this: % I need to calculate the value f(x,y)=sin((pi/2)*(x+y)) % for the function using the blending interpolation reffe...

Blending interpolation for a function

Try this: % I need to calculate the value f(x,y)=sin((pi/2)*(x+y)) % for the function using the blending interpolation reffe...

1 day ago | 1

| accepted

Answered

How do I Convert Cells containing Binary Values into Cells of Decimal Values and Decimal Values into Strings?

Try this: % Create sample data. A = zeros(5, 1000); A(randperm(numel(A), 200)) = nan; A(randperm(numel(A), 800)) = 1; [rows...

How do I Convert Cells containing Binary Values into Cells of Decimal Values and Decimal Values into Strings?

Try this: % Create sample data. A = zeros(5, 1000); A(randperm(numel(A), 200)) = nan; A(randperm(numel(A), 800)) = 1; [rows...

1 day ago | 0

Answered

Nonlinear curve fitting of multiple peaks

See my attached demo that can fit any number of Gaussians to some data. Adapt the formula from Gaussian to your special formula...

Nonlinear curve fitting of multiple peaks

See my attached demo that can fit any number of Gaussians to some data. Adapt the formula from Gaussian to your special formula...

1 day ago | 0

Answered

Fitting data with different type regression

mohammadreza: you can do a piecewise linear fit. What I did was to fit two lines. I picked a dividing line between the two set...

Fitting data with different type regression

mohammadreza: you can do a piecewise linear fit. What I did was to fit two lines. I picked a dividing line between the two set...

1 day ago | 0

Answered

Trouble formating strings with fprintf.

Try putting \t before every %20s, or else add spaces to the end of every day to make it as long as Wednesday.

Trouble formating strings with fprintf.

Try putting \t before every %20s, or else add spaces to the end of every day to make it as long as Wednesday.

1 day ago | 0

Answered

creating sliding windows for own purpose(do not want to calculate std or mean or any of that stuff)

There is a function that does this in the Image Processing Toolbox. It is called blockproc(). You can define your overlap (if ...

creating sliding windows for own purpose(do not want to calculate std or mean or any of that stuff)

There is a function that does this in the Image Processing Toolbox. It is called blockproc(). You can define your overlap (if ...

2 days ago | 0

| accepted

Answered

How to find the middle 25% of an array?

Try this X = length(yourVector) index1 = round(vecLength * (0.5 - 0.25/2)) index2 = round(vecLength * (0.5 + 0.25/2)) Y = X(...

How to find the middle 25% of an array?

Try this X = length(yourVector) index1 = round(vecLength * (0.5 - 0.25/2)) index2 = round(vecLength * (0.5 + 0.25/2)) Y = X(...

2 days ago | 0

| accepted

Answered

Stitching image in 2 direction

If you don't want to butt the images against each other but there is some overlap that needs to be determined, then you will nee...

Stitching image in 2 direction

If you don't want to butt the images against each other but there is some overlap that needs to be determined, then you will nee...

2 days ago | 0

| accepted

Answered

How can I calculate the standard deviation for a part of "all data"?

I have no idea what "a" is. But is this something like you were looking for? timeVec = [0,0.5,2,4,6] % Don't use "time" since ...

How can I calculate the standard deviation for a part of "all data"?

I have no idea what "a" is. But is this something like you were looking for? timeVec = [0,0.5,2,4,6] % Don't use "time" since ...

2 days ago | 0

| accepted

Answered

Counting Total Number of Pixels by Color in a Segmented Image

Code is in the FAQ: https://matlab.fandom.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F In the for loop over all image ...

Counting Total Number of Pixels by Color in a Segmented Image

Code is in the FAQ: https://matlab.fandom.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F In the for loop over all image ...

2 days ago | 0

| accepted

Answered

Outline the shape in the image

You can use bwboundaries() and plot(): binaryImage = 0.6 < grayImage & grayImage < 1; boundaries = bwboundaries(binaryImage);...

Outline the shape in the image

You can use bwboundaries() and plot(): binaryImage = 0.6 < grayImage & grayImage < 1; boundaries = bwboundaries(binaryImage);...

2 days ago | 0

Answered

positive and negative deflection

mean is a built-in function. It requires an argument, like mean(RF). Then it should work. mu = mean(RF); standarDeviation = ...

positive and negative deflection

mean is a built-in function. It requires an argument, like mean(RF). Then it should work. mu = mean(RF); standarDeviation = ...

2 days ago | 0

| accepted

Answered

Plot each image on the same figure. Use enough time increments so that the period of the largest frequency of oscillation has about 40 time increments per period

For the same figure, different axes, use subplot subplot(2, 3, 1); plot(t, y1); subplot(2, 3, 2); plot(t, y2); subplot(2, 3...

Plot each image on the same figure. Use enough time increments so that the period of the largest frequency of oscillation has about 40 time increments per period

For the same figure, different axes, use subplot subplot(2, 3, 1); plot(t, y1); subplot(2, 3, 2); plot(t, y2); subplot(2, 3...

2 days ago | 0

Answered

image processing problem in Salt and Pepper noise

A better method is to use a modified median filter where you only replace the noise pixels with the median, not ALL pixels. Thi...

image processing problem in Salt and Pepper noise

A better method is to use a modified median filter where you only replace the noise pixels with the median, not ALL pixels. Thi...

2 days ago | 0

Answered

Stitching image in 2 direction

To stitch images: wideImage = [image1, image2]; % Must have same number of rows. tallImage = [image1; image2]; % Must have sam...

Stitching image in 2 direction

To stitch images: wideImage = [image1, image2]; % Must have same number of rows. tallImage = [image1; image2]; % Must have sam...

2 days ago | 0

Answered

Spikes at the start of audio recording

I'd do it in the time domain. I'd just crop it out, as long as it doesn't overlap any good signal. Just find the first negativ...

Spikes at the start of audio recording

I'd do it in the time domain. I'd just crop it out, as long as it doesn't overlap any good signal. Just find the first negativ...

2 days ago | 0

Answered

RMS image process for multiple photographs

What is the RMS result and RMS code? What does dichotomize mean? You mean binarize or threshold??? What I'd do is, if you wan...

RMS image process for multiple photographs

What is the RMS result and RMS code? What does dichotomize mean? You mean binarize or threshold??? What I'd do is, if you wan...

2 days ago | 0

Answered

color transform to lab then to rgb

Try this: rgbImage = imread('peppers.png'); labImage = rgb2lab(rgbImage); lImage = labImage(:, :, 1); aImage = labImage(:, :...

color transform to lab then to rgb

Try this: rgbImage = imread('peppers.png'); labImage = rgb2lab(rgbImage); lImage = labImage(:, :, 1); aImage = labImage(:, :...

2 days ago | 0

| accepted

Answered

Fill area between plot and the 0-line?

For a more general situation, see the FAQ: https://matlab.fandom.com/wiki/FAQ#How_do_I_shade_the_region_between_two_curves.3F

Fill area between plot and the 0-line?

For a more general situation, see the FAQ: https://matlab.fandom.com/wiki/FAQ#How_do_I_shade_the_region_between_two_curves.3F

2 days ago | 0

Answered

Determine the true length of the object - image analysis

Try bwskel() and then, if it's too short, find the two points farthest way from each other and extend the endpoints of the skel...

Determine the true length of the object - image analysis

Try bwskel() and then, if it's too short, find the two points farthest way from each other and extend the endpoints of the skel...

2 days ago | 0

Answered

convolution of a function

See attached demo, where I do the filtering both in the spatial domain and the Fourier domain. You can adapt it to 1-D signals ...

convolution of a function

See attached demo, where I do the filtering both in the spatial domain and the Fourier domain. You can adapt it to 1-D signals ...

2 days ago | 0

Answered

Modifying the NDVI Values Using Multispectral Images

Try this: maxValue = max(NDVI(:)) minValue = min(NDVI(:)) binaryImage = NDVI > 0.3; You might also be interested in my inter...

Modifying the NDVI Values Using Multispectral Images

Try this: maxValue = max(NDVI(:)) minValue = min(NDVI(:)) binaryImage = NDVI > 0.3; You might also be interested in my inter...

2 days ago | 0

| accepted

Answered

What is problem to make space curve [2*cos(t),2*sin(t),5]?

Not sure what the 5 is for, but maybe you mean this, using plot3() to plot a 3-D curve: t = 0 : pi/10 : pi; plot3(t, 2*cos(t),...

What is problem to make space curve [2*cos(t),2*sin(t),5]?

Not sure what the 5 is for, but maybe you mean this, using plot3() to plot a 3-D curve: t = 0 : pi/10 : pi; plot3(t, 2*cos(t),...

3 days ago | 0

Answered

How to find the neighboring maxima in an image

Why not simply use imregionalmax()?

How to find the neighboring maxima in an image

Why not simply use imregionalmax()?

3 days ago | 0

| accepted

Answered

Read and process multiple images

Code samples in the FAQ: https://matlab.fandom.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F

Read and process multiple images

Code samples in the FAQ: https://matlab.fandom.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F

3 days ago | 0

| accepted