29 310 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

Answered

how to calculate the distance between different pixels

Try imdistline() or improfile() to get the distance either in pixels or real world units (if you've used XDAta when you called i...

how to calculate the distance between different pixels

Try imdistline() or improfile() to get the distance either in pixels or real world units (if you've used XDAta when you called i...

environ 12 heures ago | 0

Answered

Segment Dumbbell Structure into Two Circles and One Rectangle

Try imfindcircles() to find the centers and radii of the circles. Then create a circular mask to mask them out -- see The FAQ...

Segment Dumbbell Structure into Two Circles and One Rectangle

Try imfindcircles() to find the centers and radii of the circles. Then create a circular mask to mask them out -- see The FAQ...

environ 12 heures ago | 0

Answered

Why is my code not working?

You can't pass a double RGB image into regionprops. You must pass either a binary image a labeled image, gotten from bwlabel(...

Why is my code not working?

You can't pass a double RGB image into regionprops. You must pass either a binary image a labeled image, gotten from bwlabel(...

environ 12 heures ago | 0

| accepted

Answered

how to remove period noise from an rgb image?

Why are you computing those "just_" images? I guess since you don't want explanations about how it should work, and just want c...

how to remove period noise from an rgb image?

Why are you computing those "just_" images? I guess since you don't want explanations about how it should work, and just want c...

environ 12 heures ago | 0

Answered

Get every first value above a treshold out of an array

Looks like homework so we're only giving hints. Hint: da = [0, diff(A > 4.5)] and then look up strfind() and zeros() to help ...

Get every first value above a treshold out of an array

Looks like homework so we're only giving hints. Hint: da = [0, diff(A > 4.5)] and then look up strfind() and zeros() to help ...

environ 17 heures ago | 0

Answered

How to store ROIs?

Try this: imshow('peppers.png'); uiwait(helpdlg('Draw a line')); hLine = drawline('SelectedColor','yellow'); allROIs{1} = hL...

How to store ROIs?

Try this: imshow('peppers.png'); uiwait(helpdlg('Draw a line')); hLine = drawline('SelectedColor','yellow'); allROIs{1} = hL...

environ 20 heures ago | 1

| accepted

Answered

A question about matrix

Use randperm: nside=50; world = zeros(nside, nside); num1sToInsert = 4; randomIndexes = randperm(numel(world), num1sToInsert...

A question about matrix

Use randperm: nside=50; world = zeros(nside, nside); num1sToInsert = 4; randomIndexes = randperm(numel(world), num1sToInsert...

environ 23 heures ago | 0

| accepted

Answered

How can I find indices of elements bigger or smaller than a value in different columns?

You can get a logical map of all indexes where this criteria is true this way: % A = randi(70, 6, 6) % Create sample data. col...

How can I find indices of elements bigger or smaller than a value in different columns?

You can get a logical map of all indexes where this criteria is true this way: % A = randi(70, 6, 6) % Create sample data. col...

environ 23 heures ago | 0

Answered

Undefined function or variable 'hObject' error

It looks like you've copied and pasted some code from a GUIDE-based app into your App Designer-based app. Don't do that. App D...

Undefined function or variable 'hObject' error

It looks like you've copied and pasted some code from a GUIDE-based app into your App Designer-based app. Don't do that. App D...

environ 23 heures ago | 0

Answered

Randomly select a set number of samples (of size n) without overlap, nor replacement, in a signal

Try this: % Set up the signal and sampling parameters samplingFrequency = 100; % Samples per second. totalSeconds = 6000 % 60...

Randomly select a set number of samples (of size n) without overlap, nor replacement, in a signal

Try this: % Set up the signal and sampling parameters samplingFrequency = 100; % Samples per second. totalSeconds = 6000 % 60...

environ 24 heures ago | 1

| accepted

Answered

hello!How can I segment a image using GLCM?

All I have on hand is the attached GLCM demo. Adapt as needed (e.g. threshold the image or whatever).

hello!How can I segment a image using GLCM?

All I have on hand is the attached GLCM demo. Adapt as needed (e.g. threshold the image or whatever).

1 jour ago | 0

Answered

How to draw multiple rectangular diffraction pattern

Simply use repmat(I, [8, 8]) to replicate your image 8 times in every direction. lambda=632e-9; k=(2*pi)/lambda; a=1e-3; b...

How to draw multiple rectangular diffraction pattern

Simply use repmat(I, [8, 8]) to replicate your image 8 times in every direction. lambda=632e-9; k=(2*pi)/lambda; a=1e-3; b...

1 jour ago | 0

Answered

Unequal circles in a rectangle partition into k equal layers

See previous discussions of circle packing: Click here

Unequal circles in a rectangle partition into k equal layers

See previous discussions of circle packing: Click here

1 jour ago | 0

Answered

Plot 100 random points in 2-D equations

Try this: % Get a set of random x1 and x2 for g1. x1 = rand(100, 1); x2 = rand(100, 1); g1 = 1 ./ (6*pi) * exp( (((x1-4) .^2...

Plot 100 random points in 2-D equations

Try this: % Get a set of random x1 and x2 for g1. x1 = rand(100, 1); x2 = rand(100, 1); g1 = 1 ./ (6*pi) * exp( (((x1-4) .^2...

1 jour ago | 0

Answered

how do i count unique cell rows?

There are more compact (read cryptic) ways, but this simple and easy-to-understand (for a beginner) way using a for loop and swi...

how do i count unique cell rows?

There are more compact (read cryptic) ways, but this simple and easy-to-understand (for a beginner) way using a for loop and swi...

1 jour ago | 0

Answered

error using bwferet function in matlab 2016a

It was not until Release 2019a that that function was introduced. For some reason, you didn't fill out the form completely when...

error using bwferet function in matlab 2016a

It was not until Release 2019a that that function was introduced. For some reason, you didn't fill out the form completely when...

2 jours ago | 0

Answered

How can I remove unwanted objects and segment the swan?

You can do with functions in the Computer Vision Toolbox. See this link. you mgiht also look at Hus moments: http://www.youtub...

How can I remove unwanted objects and segment the swan?

You can do with functions in the Computer Vision Toolbox. See this link. you mgiht also look at Hus moments: http://www.youtub...

2 jours ago | 0

Answered

Rayleigh random variables for σ = 1. Plot the histogram for the 20000 symbols and compare it with the corresponding Rayleigh PDF

For what it's worth, I'm attaching my Rayleigh demo. Adapt as needed. I did it a long time ago. There is now a function now b...

Rayleigh random variables for σ = 1. Plot the histogram for the 20000 symbols and compare it with the corresponding Rayleigh PDF

For what it's worth, I'm attaching my Rayleigh demo. Adapt as needed. I did it a long time ago. There is now a function now b...

2 jours ago | 0

| accepted

Answered

How I can choose randomly value from cell?

Here's one way, if you need to get the value within a loop where you're doing other things: SI = {[1, 2], [2, 3]} for k = 1 : ...

How I can choose randomly value from cell?

Here's one way, if you need to get the value within a loop where you're doing other things: SI = {[1, 2], [2, 3]} for k = 1 : ...

2 jours ago | 1

Answered

how to search for a red circle in an image?

Sorry, I can't do it without using any built-in functions, though the functions I use are pretty low level, like imread(), imsho...

how to search for a red circle in an image?

Sorry, I can't do it without using any built-in functions, though the functions I use are pretty low level, like imread(), imsho...

2 jours ago | 0

| accepted

Answered

How to Ignore the last line from a file read

Try this: % Read in data. d = importdata('data.txt') % Now plot each row of data for k = 1 : 4 plot(d(k, :), '.-', 'Line...

How to Ignore the last line from a file read

Try this: % Read in data. d = importdata('data.txt') % Now plot each row of data for k = 1 : 4 plot(d(k, :), '.-', 'Line...

2 jours ago | 0

| accepted

Answered

How to create a FILLED circle within a matrix

See the FAQ on how to create a circle

How to create a FILLED circle within a matrix

See the FAQ on how to create a circle

2 jours ago | 0

Answered

Darcy's law

You're setting up your boundary conditions incorrectly. You're overwriting the corners with different numbers. I think maybe y...

Darcy's law

You're setting up your boundary conditions incorrectly. You're overwriting the corners with different numbers. I think maybe y...

2 jours ago | 0

Answered

How to access image name in imageDatastore?

Use fileparts(): imds = imageDatastore('*.png') fullFileNames = vertcat(imds.Files) for k = 1 : length(fullFileNames) [fold...

How to access image name in imageDatastore?

Use fileparts(): imds = imageDatastore('*.png') fullFileNames = vertcat(imds.Files) for k = 1 : length(fullFileNames) [fold...

2 jours ago | 0

| accepted

Answered

Warning creating vertical line using xline

It worked for me. As an alternative, you might try the older line() and then use text() to place the text annotation.

Warning creating vertical line using xline

It worked for me. As an alternative, you might try the older line() and then use text() to place the text annotation.

2 jours ago | 0

Answered

Choose my k-term from matrix and defines by itself on for loop

It's not clear. Not sure what x1, a, and c are. It looks like the user enters some number of values for x1, then somehow, some...

Choose my k-term from matrix and defines by itself on for loop

It's not clear. Not sure what x1, a, and c are. It looks like the user enters some number of values for x1, then somehow, some...

2 jours ago | 0

Answered

Index in position 1 is invalid. Array indices must be positive integers or logical values.

The first row is not 0 -- it's 1. Try plot(x, Tdata(1,:), 'b-', 'LineWidth', 2); This is one of the most frequently asked que...

Index in position 1 is invalid. Array indices must be positive integers or logical values.

The first row is not 0 -- it's 1. Try plot(x, Tdata(1,:), 'b-', 'LineWidth', 2); This is one of the most frequently asked que...

3 jours ago | 0

Answered

How to get cluster more than 2 if i have :

Just define Cluster3 to be something. What would you want it to be? It could be virtually anything you direct it to be.

How to get cluster more than 2 if i have :

Just define Cluster3 to be something. What would you want it to be? It could be virtually anything you direct it to be.

3 jours ago | 0

Answered

Short Question about Multiple cases in for end

One way is to do nested for loops for j=1:10 for k=0:9 for m=1:11 for n=1:1 x(j)^k + m -2*n end % of n loop ...

Short Question about Multiple cases in for end

One way is to do nested for loops for j=1:10 for k=0:9 for m=1:11 for n=1:1 x(j)^k + m -2*n end % of n loop ...

3 jours ago | 1

| accepted