Answered
Grouping boundary points of several ROIs
This may be extraneous, but if you don't need the boundary coordinates for anything other than finding the extrema, consider thi...

5 years ago | 0

| accepted

Answered
How to display an array that is stored in a cell in my input statement?
There are probably a bunch of ways to do this, but here's a simple way: badValues = {[1 2 3 4],[1; 2; 3; 4],[1 2; 3 4]}; k = 1...

5 years ago | 1

| accepted

Answered
How can I read Fujifilm 3D .mpo files in 2021 (two jpeg)? Earlier solution code doesn't seem to work anymore.
Here. I attached a modified version. Give it a whirl and see if anything changes. It at least works for the sample images I h...

5 years ago | 2

| accepted

Answered
if statement with greater than and less than
I was kind of expecting that to work, but I never write conditionals that way. Try if (MBPosition >= 0) && (MBPosition <= 2*De...

5 years ago | 0

| accepted

Answered
Find matrix inside larger matrix with tolerance
As I mentioned, you can do this with nlfilter() A = [8 1 4 8 8 5; 8 3 10 2 3 10; 4 1 1 5 7 4; 7 ...

5 years ago | 0

| accepted

Answered
how to separate objects in image using matlab
Consider: inpict = imread('toolspic.png'); % cropped from thumbnail bpict = rgb2gray(inpict)<220; % pick a threshold to isolat...

5 years ago | 2

| accepted

Answered
Why would the same x and y data points be plotted differently on UIaxis (app designer)?
Somewhere along the way, it looks like you're setting the y-scale to logarithmic. x =[353 423 625]; y = [1461 1760 2614]; pl...

5 years ago | 0

| accepted

Answered
i m getting error while running code
rms() is part of the signal processing toolbox. Do you have SPT? If not, you can always define your own function that does the...

5 years ago | 0

Answered
How to assign character to foreground and background in image?
What you describe sounds like a simple logical masking operation, but the image appears to be a mosaic instead. If the latter i...

5 years ago | 0

| accepted

Question


Is there a way to report/flag submissions on the File Exchange?
This isn't the first time I've run into this, but is there a way to do anything about such things other than rating/tagging? The...

5 years ago | 2 answers | 0

2

answers

Answered
Plot image on different axes
Consider the example: inpict = zeros(250); inpict(50:100,150:200) = 0.6; x = linspace(-10*pi,10*pi,1000); y = sin(x)+x; ...

5 years ago | 0

Answered
Find an index of a cell whose element satisfies a condition
This is one way: c = {[1,2,3], [2,3,1], [3,1,2], [1,2,3], [2,3,1], [3,1,2]}; idx = find(cellfun(@(x) x(2)==1,c))

5 years ago | 1

Answered
What is the best approach to find a smaller matrix within a larger matrix (may not be identical, but need region if highest match)??
This isn't really a good answer, since I can't offer an explanation of why it works differently, but it works if I do it like th...

5 years ago | 0

Answered
How to split a large image into many small images?
Blockwise filtering has already been mentioned; since I don't know if that applies to your needs and I have no familiarity with ...

5 years ago | 0

| accepted

Answered
Generate random integers that sums to a specific number within a specific range
I've been wasting time on trying to do something similar lately. I can't believe I missed this question. For my own purposes, ...

5 years ago | 1

Answered
calculating centroids of multiple ROIs at a time
If you have the binarized image, just use regionprops. inpict = imread('blobs.png'); % standard test image S = regionprops(...

5 years ago | 0

| accepted

Answered
How to index one array by assigned vector in certain dimension
There are probably multiple ways of doing this. It could probably be done with a bunch of reshaping and such, but I did it this...

5 years ago | 1

| accepted

Answered
I need help with pixel neighborhood operations
If you have Image Processing Toolbox, you likely don't need to resort to any sort of pointwise looping code. Most such operatio...

5 years ago | 0

| accepted

Answered
Extracting all possible vectors from a big vector
Sure they're vectors. v=[1 2 3 4]; v = uint16(v); % there's no point doing this repeatedly in the loop C = {}; for k = 1:n...

5 years ago | 0

| accepted

Answered
Change output view of pin cushion distortion
Maybe try something like s = r - (b/rmax.^2)*r.^3; % this is the same as before s = s/(max(s(:))/rmax); % or use whatever scal...

5 years ago | 0

| accepted

Answered
Hello, can anyone solve this preallocation problem in my code?
You had allocated an empty vector and were growing it by concatenation. It works, but is often slower. Since you know the size...

5 years ago | 0

| accepted

Answered
Weird output image after applying mask
The output of edge() is logical. When roifilt2() goes to composite the filtered and original images, this causes the non-filter...

5 years ago | 1

| accepted

Answered
How to calculate entropy of a DICOM image (16-bit depth)?
Just open up entropy() or look at the docs to see how it works. % just grab some image and make it into an example inpict = ...

5 years ago | 0

| accepted

Answered
I have 4 bits combinations, and I want to change the size of the matrix HT depending on these combinations, the description below
Not sure how you want to handle HT, but here goes: n = 4; %number of bits % don't need all those loops A = dec2bin(0:2^n-1)...

5 years ago | 0

| accepted

Answered
My pictures have a format of [227 227 1] so I had the idea to triplicate my processed pictures and put them back into one to get a format of [227 227 3], how can I do this?
To rearrange a single-channel intensity image into a grayscale RGB image, you can just do Argb = repmat(Aint,[1 1 3]); I don't...

5 years ago | 0

Answered
How to do OR operation of two images (DFT and Binary)?
I'm not sure what you're actually trying to do. Your description makes sense, but you're doing the bitwise OR of a logical imag...

5 years ago | 0

Answered
How do I code this for loop?
I don't know how you're getting anything out of it, since the index isn't even being used. You could do this: vd_inc = 1:100; ...

5 years ago | 0

| accepted

Answered
Remove Grid Lines from a Graph
It depends what you want and what you expect. If all you want is one or two pictures, it's by far easier to do this manually ou...

5 years ago | 1

| accepted

Answered
error while running watershed
I don't know how you'd be getting that error unless there's a problem with conndef.m Maybe it's being shadowed, so check the pa...

5 years ago | 1

Answered
How can I divide the colorbar into just two ranges?
One way is to specify the colormap and caxis(); consider the example [x y z] = sphere(30); surf(x,y,z); axis equal datar...

5 years ago | 0

Load more