Senior Scientist (male/man) 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. Member of the Mathworks Community Advisory Board. 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

Sorting arrays after finding closest values

Try this: x = [1 2 3 5 7 8]; % x values y = [3 6 19 99 291 444]; % y values x1 = [2.8 4.4 7.1]; % find the closest 2,3,4 x p...

Sorting arrays after finding closest values

Try this: x = [1 2 3 5 7 8]; % x values y = [3 6 19 99 291 444]; % y values x1 = [2.8 4.4 7.1]; % find the closest 2,3,4 x p...

ongeveer 10 uur ago | 0

| accepted

Answered

Linear fit for a intensity plot (surface plot)

regionprops() fits the image to an ellipse and returns the center and angle in degrees. Try this: clc; % Clear the command ...

Linear fit for a intensity plot (surface plot)

regionprops() fits the image to an ellipse and returns the center and angle in degrees. Try this: clc; % Clear the command ...

ongeveer 13 uur ago | 1

| accepted

Answered

How can I split the signal in matlab

How about index = find(signal > 0.47, 1, 'first'); noisyLeftSide = signal(1:index); goodRightSide = signal(index+1 : end);

How can I split the signal in matlab

How about index = find(signal > 0.47, 1, 'first'); noisyLeftSide = signal(1:index); goodRightSide = signal(index+1 : end);

1 dag ago | 0

| accepted

Answered

Error in storing for loop iterations

It's thoroughly explained by the FAQ: https://matlab.fandom.com/wiki/FAQ#.22Subscript_indices_must_either_be_real_positive_inte...

Error in storing for loop iterations

It's thoroughly explained by the FAQ: https://matlab.fandom.com/wiki/FAQ#.22Subscript_indices_must_either_be_real_positive_inte...

1 dag ago | 0

Answered

Is there any close instruction associated with a datasore

I don't believe so. I don't think it's really "opening" any database, it's just collecting a bunch of information. You could a...

Is there any close instruction associated with a datasore

I don't believe so. I don't think it's really "opening" any database, it's just collecting a bunch of information. You could a...

1 dag ago | 0

Answered

how to call the function and where i should call command window?? or within the niew script(in my code)

Call it from within your script and pass in the values. For example, this might be your script (m-file): h_in = 5; % Whatever ...

how to call the function and where i should call command window?? or within the niew script(in my code)

Call it from within your script and pass in the values. For example, this might be your script (m-file): h_in = 5; % Whatever ...

1 dag ago | 0

Answered

how to sort a cell array based on another cell array

So 'the' has 1 occurrence, 'keep' has 18 occurrences, 'up' has 2 occurrences, and so on. Exactly where ARE these occurrences? ...

how to sort a cell array based on another cell array

So 'the' has 1 occurrence, 'keep' has 18 occurrences, 'up' has 2 occurrences, and so on. Exactly where ARE these occurrences? ...

1 dag ago | 0

| accepted

Answered

how to segment (divide) an image into 4 equal halves?

Since everyone seems to want a different number, I've created this general purpose demo where you can specify how many strips ve...

how to segment (divide) an image into 4 equal halves?

Since everyone seems to want a different number, I've created this general purpose demo where you can specify how many strips ve...

1 dag ago | 0

Answered

computing the cumulative matrix with some conditions

Why can't you just make up a look up table like [0, 2, 4, -5] and so on. Then just do a simple for loop for the various conditi...

computing the cumulative matrix with some conditions

Why can't you just make up a look up table like [0, 2, 4, -5] and so on. Then just do a simple for loop for the various conditi...

3 dagen ago | 0

Answered

Phase of an image, fft

No. You cannot get the phase of a Fourier transform from only the magnitude of the Fourier Transform. And of course getting th...

Phase of an image, fft

No. You cannot get the phase of a Fourier transform from only the magnitude of the Fourier Transform. And of course getting th...

3 dagen ago | 0

Answered

How to detect a thick grid in an image

Try taking the radon transform to get projections at every angle, then use find peaks to determine the spacing of the dark gridl...

How to detect a thick grid in an image

Try taking the radon transform to get projections at every angle, then use find peaks to determine the spacing of the dark gridl...

3 dagen ago | 2

| accepted

Answered

A MATLAB Dice Function to display the face of the dice

Try rectangle() to make the rounded rectangle, and plot() or scatter(x,y,'filled') to make the spots, though you could use recta...

A MATLAB Dice Function to display the face of the dice

Try rectangle() to make the rounded rectangle, and plot() or scatter(x,y,'filled') to make the spots, though you could use recta...

3 dagen ago | 1

Answered

Divide a number N into K numbers

Here's one way. (Hopefully it's not your homework. Tag it as homework if it is.) N = 8; r = 1 + 15 * rand(10000, N) % Compu...

Divide a number N into K numbers

Here's one way. (Hopefully it's not your homework. Tag it as homework if it is.) N = 8; r = 1 + 15 * rand(10000, N) % Compu...

3 dagen ago | 1

Answered

Divide a number N into K numbers

randfixedsum(): https://www.mathworks.com/matlabcentral/fileexchange/9700-random-vectors-with-fixed-sum?s_tid=srchtitle ...

Divide a number N into K numbers

randfixedsum(): https://www.mathworks.com/matlabcentral/fileexchange/9700-random-vectors-with-fixed-sum?s_tid=srchtitle ...

3 dagen ago | 1

Answered

Isolate clusters from a series of points

Frederica, Here is a full demo: clc; % Clear command window. clear; % Delete all variables. close all; % Close all figure win...

Isolate clusters from a series of points

Frederica, Here is a full demo: clc; % Clear command window. clear; % Delete all variables. close all; % Close all figure win...

3 dagen ago | 1

Answered

Isolate clusters from a series of points

You can use kmeans() to determine the location of 5 cluster centroids. Then compute the distances of each point in the class fr...

Isolate clusters from a series of points

You can use kmeans() to determine the location of 5 cluster centroids. Then compute the distances of each point in the class fr...

3 dagen ago | 1

| accepted

Answered

how to fit y=ax^b without curve fitting

You can use fitnlm() - Fit Non-linear model. See attached for a bunch of demos where I use it on a wide variety of equations. ...

how to fit y=ax^b without curve fitting

You can use fitnlm() - Fit Non-linear model. See attached for a bunch of demos where I use it on a wide variety of equations. ...

3 dagen ago | 0

Answered

Extract the INNER white region of an image with black and white intersection.

Try this: % Demo by Image Analyst, March, 2021. clc; % Clear the command window. close all; % Close all figures (except t...

Extract the INNER white region of an image with black and white intersection.

Try this: % Demo by Image Analyst, March, 2021. clc; % Clear the command window. close all; % Close all figures (except t...

4 dagen ago | 1

Answered

Extract the INNER white region of an image with black and white intersection.

First of all you don't need imclearborder because there is no part of your blob that touches the border. And after bwareafilt()...

Extract the INNER white region of an image with black and white intersection.

First of all you don't need imclearborder because there is no part of your blob that touches the border. And after bwareafilt()...

4 dagen ago | 0

| accepted

Answered

Calculating elements of A from k-point mean values

You can get the original signal only if you know the weights. Otherwise with unknown weights and unknown original signal, there...

Calculating elements of A from k-point mean values

You can get the original signal only if you know the weights. Otherwise with unknown weights and unknown original signal, there...

4 dagen ago | 0

Answered

I have some isssue with my codes

To get the convex hull, call bwconvhull() chImage = bwconvhull(BW); There is an option to do the convex hulls of each region i...

I have some isssue with my codes

To get the convex hull, call bwconvhull() chImage = bwconvhull(BW); There is an option to do the convex hulls of each region i...

4 dagen ago | 0

Answered

Does something wrong with my code in ellipse fitting?

See my attached ellipse fitting demo and adapt as needed.

Does something wrong with my code in ellipse fitting?

See my attached ellipse fitting demo and adapt as needed.

4 dagen ago | 0

Answered

legend label for subplots

Can't you just put the legend in one and then users can/will assume the legend applies to all the other 5 plots? Or else put up...

legend label for subplots

Can't you just put the legend in one and then users can/will assume the legend applies to all the other 5 plots? Or else put up...

5 dagen ago | 0

Answered

Improve speed reading in a .dat file

You could try fileread() to read in the whole file into one variable in one shot, then go through it parsing it.

Improve speed reading in a .dat file

You could try fileread() to read in the whole file into one variable in one shot, then go through it parsing it.

5 dagen ago | 0

Answered

What should I do if the brightness of backgroud is very close to foreground?

They don't look that close. Thresholding should work fairly well. Otherwise use SegNet deep learing if you need to identify tr...

What should I do if the brightness of backgroud is very close to foreground?

They don't look that close. Thresholding should work fairly well. Otherwise use SegNet deep learing if you need to identify tr...

6 dagen ago | 0

| accepted

Answered

How can I rotate an ellipse randomly

See my attached demos. Adapt as needed.

How can I rotate an ellipse randomly

See my attached demos. Adapt as needed.

6 dagen ago | 0

Answered

How to use Xlswrite command in actxserver and how to avoid script gets hanged due to hworkbook.close command?

I don't think you need th close function. Just delete that line and it should shutdown just fine.

How to use Xlswrite command in actxserver and how to avoid script gets hanged due to hworkbook.close command?

I don't think you need th close function. Just delete that line and it should shutdown just fine.

7 dagen ago | 0

Answered

how to find derivative of a function and ploting the surface of function and its derivative

If you have a 2-D array of numbers, you can use surf() to plot a 3-D rendering of it, or imshow() to display it as an image. If...

how to find derivative of a function and ploting the surface of function and its derivative

If you have a 2-D array of numbers, you can use surf() to plot a 3-D rendering of it, or imshow() to display it as an image. If...

8 dagen ago | 1

Answered

How to fill the gaps on the boundary surface of the cone using MATLAB?

The code didn't run so I repaired and improved it below. Other than that I don't know anything about it because unfortunately t...

How to fill the gaps on the boundary surface of the cone using MATLAB?

The code didn't run so I repaired and improved it below. Other than that I don't know anything about it because unfortunately t...

8 dagen ago | 1