#Image Processing

#Learner Alma #TezpurUniv

Answered

How to trace the boundray of object in an image using MATLAB?

se=strel('disk',2); im=imerode(~binary_image,se); result=bwareafilt(im,1); result=imdilate(result,se); imshow(result); Plea...

How to trace the boundray of object in an image using MATLAB?

se=strel('disk',2); im=imerode(~binary_image,se); result=bwareafilt(im,1); result=imdilate(result,se); imshow(result); Plea...

10 hours ago | 0

Answered

How to find the last 1 in every row

A=rot90(A,90); [~,idx]=max(A==1,[],2) Result: idx = 2 3 2

How to find the last 1 in every row

A=rot90(A,90); [~,idx]=max(A==1,[],2) Result: idx = 2 3 2

12 hours ago | 0

Answered

for loop to go through a cell array

No loop needed here % FOllowing result counts the total grain left rice pile result=sum(xc_array>ricepileoutlet) Note: Assum...

for loop to go through a cell array

No loop needed here % FOllowing result counts the total grain left rice pile result=sum(xc_array>ricepileoutlet) Note: Assum...

1 day ago | 0

Answered

How can I overlay my binary gray image red?

Generally, I prefer to set this way. Before applying the color, please adjut the piels condition or area to be color Here, just...

How can I overlay my binary gray image red?

Generally, I prefer to set this way. Before applying the color, please adjut the piels condition or area to be color Here, just...

2 days ago | 0

Answered

I was trying to average 20 schlieren images. For that i wrote this code. But i am getting a white image as output image after averaging. Please help me with this. Thank you

numImages=20; myFolder = 'D:\postprocessing\OR 3 NPR 3.5 flatplate _C001H001S0001'; if ~isdir(myFolder) errorMessage = spri...

I was trying to average 20 schlieren images. For that i wrote this code. But i am getting a white image as output image after averaging. Please help me with this. Thank you

numImages=20; myFolder = 'D:\postprocessing\OR 3 NPR 3.5 flatplate _C001H001S0001'; if ~isdir(myFolder) errorMessage = spri...

3 days ago | 1

Answered

Creating an 8x8 matrix using loops

"I can create it using reshape() but I want to get the same output using loops.How's that possible? For and if loop to be more ...

Creating an 8x8 matrix using loops

"I can create it using reshape() but I want to get the same output using loops.How's that possible? For and if loop to be more ...

5 days ago | 0

Answered

Replace even element with zero

"I am trying to replace even elements in my matrix with zero like below:" a(2:2:end)=0 But the example is different ?? a = [...

Replace even element with zero

"I am trying to replace even elements in my matrix with zero like below:" a(2:2:end)=0 But the example is different ?? a = [...

5 days ago | 0

Answered

Add interpolated data at a specific location in the main array.

This way? array_new=[array_data(1:28),int_data,array_data(29:end)]

Add interpolated data at a specific location in the main array.

This way? array_new=[array_data(1:28),int_data,array_data(29:end)]

6 days ago | 1

Answered

Error using .* Matrix dimensions must agree. Error in eff_vs_length (line 20) Ty1=1-exp((-U.*AsurY)./(m.*C)) >>

Please define h,Kp and Kg h=...? Kp=..? Kg=....? % Assumning all are scalar % L=9.512; Y=0:9.512; m=0.11; C=1007; ...

Error using .* Matrix dimensions must agree. Error in eff_vs_length (line 20) Ty1=1-exp((-U.*AsurY)./(m.*C)) >>

Please define h,Kp and Kg h=...? Kp=..? Kg=....? % Assumning all are scalar % L=9.512; Y=0:9.512; m=0.11; C=1007; ...

6 days ago | 1

Answered

How to plot data contains only ones?

user_number=20; test_data=ones(1,user_number); plot(1:user_number,test_data); And yes, you definitely find the straight line ...

How to plot data contains only ones?

user_number=20; test_data=ones(1,user_number); plot(1:user_number,test_data); And yes, you definitely find the straight line ...

6 days ago | 1

Answered

Looping with MATLAB Tables

Steps: Load files Link Save the results v_ms,oat_k,bhp in array or cell array as per result data type load tables v_ms(i)=z...

Looping with MATLAB Tables

Steps: Load files Link Save the results v_ms,oat_k,bhp in array or cell array as per result data type load tables v_ms(i)=z...

6 days ago | 1

| accepted

Answered

why error is coming "undefined function or variable"?

There is no such "bit3xor" inbuilt function in MATLAB. It might be custom function, if so please keep the bit3xor.m file in the ...

why error is coming "undefined function or variable"?

There is no such "bit3xor" inbuilt function in MATLAB. It might be custom function, if so please keep the bit3xor.m file in the ...

6 days ago | 0

Answered

Read a subset of variables in Data Store

subset=[...]; % define for i=1:length(subset) filename=['d',num2str(subset(i))]; % Load the data one by one as per subset num...

Read a subset of variables in Data Store

subset=[...]; % define for i=1:length(subset) filename=['d',num2str(subset(i))]; % Load the data one by one as per subset num...

7 days ago | 0

Answered

hot to plot data on right side of y-axis?

T=[29.164 30.256 31.186 32.237 33.127 34.137 35.148 37.129 36.119 35.148 34.137 33.127] I=[116 207 414 611 909 1009 951 909 805...

hot to plot data on right side of y-axis?

T=[29.164 30.256 31.186 32.237 33.127 34.137 35.148 37.129 36.119 35.148 34.137 33.127] I=[116 207 414 611 909 1009 951 909 805...

7 days ago | 1

| accepted

Answered

Audio segmentation in Matalb

Load the file with xlsread ('filename'), once loaded to the MATLAB workspace, you can see the dimentions of the file as matrix d...

Audio segmentation in Matalb

Load the file with xlsread ('filename'), once loaded to the MATLAB workspace, you can see the dimentions of the file as matrix d...

7 days ago | 0

Answered

why the following code do this to make binary a image

There are several methods to obtain the resulting image as a logical or binary image. That does not mean, why does it not follow...

why the following code do this to make binary a image

There are several methods to obtain the resulting image as a logical or binary image. That does not mean, why does it not follow...

7 days ago | 1

Answered

Regarding usage of imoverlay

See the Example: data_bw=imbinarize(imread('eight.png')); [r,c]=size(data_bw); data_rgb=imresize(imread('B.jpeg'),[r,c]); r...

Regarding usage of imoverlay

See the Example: data_bw=imbinarize(imread('eight.png')); [r,c]=size(data_bw); data_rgb=imresize(imread('B.jpeg'),[r,c]); r...

7 days ago | 0

Answered

How do I get a for loop to move through values in an array?

"To do this I created some loops that should go through each value in an array and compare it with the same positioned value in ...

How do I get a for loop to move through values in an array?

"To do this I created some loops that should go through each value in an array and compare it with the same positioned value in ...

8 days ago | 0

| accepted

Answered

Different color for every point - Scatter3

"It would be tremendously helpful if I could have every point have a different color, it doesn't matter which. It would help me ...

Different color for every point - Scatter3

"It would be tremendously helpful if I could have every point have a different color, it doesn't matter which. It would help me ...

8 days ago | 0

Answered

How I segment this image?

Steps: Read the image Convert to gray Apply Gamma Scaling (Which helps to boost Higher pixels and supress lower values pixels...

How I segment this image?

Steps: Read the image Convert to gray Apply Gamma Scaling (Which helps to boost Higher pixels and supress lower values pixels...

8 days ago | 1

| accepted

Answered

Legend being occupied by background spectrogram

Questions 1: You have only one legened in the provided code legend({'A','B'},'FontSize',15,'Location','northwest') Question ...

Legend being occupied by background spectrogram

Questions 1: You have only one legened in the provided code legend({'A','B'},'FontSize',15,'Location','northwest') Question ...

8 days ago | 0

Answered

Angles to arrow representation

data=xlsread('New Microsoft Excel Worksheet.xlsx'); l=0.5; % Length of the arrow for i=1:6 for j=1:6 angle=data(i,j...

Angles to arrow representation

data=xlsread('New Microsoft Excel Worksheet.xlsx'); l=0.5; % Length of the arrow for i=1:6 for j=1:6 angle=data(i,j...

8 days ago | 0

| accepted

Answered

why i'm getting this error?

Error using DAGNetwork/calculatePredict>predictBatch (line 151) Incorrect input size. The input images must have a size of [224...

why i'm getting this error?

Error using DAGNetwork/calculatePredict>predictBatch (line 151) Incorrect input size. The input images must have a size of [224...

8 days ago | 0

Answered

plotting in matlab using implicit

"but i only want curves and their intersections" Try this way, you will get edge boundary only fimplicit3(eqn1,[-0.008 0.001 -...

plotting in matlab using implicit

"but i only want curves and their intersections" Try this way, you will get edge boundary only fimplicit3(eqn1,[-0.008 0.001 -...

8 days ago | 0

Answered

How to find the index of a specific entry in an array

idx=find(array_data==particular_entry)

How to find the index of a specific entry in an array

idx=find(array_data==particular_entry)

8 days ago | 0

| accepted

Answered

How to compare future vector value to a past one in a while loop

How to compare future vector value to a past one in a while loop In such case you may use cell array to store the invidivual ar...

How to compare future vector value to a past one in a while loop

How to compare future vector value to a past one in a while loop In such case you may use cell array to store the invidivual ar...

8 days ago | 0

Answered

Delete specific numbers from cell array

result=cell(1,20); for i=1:20 data=p2(:,i); data(data==0)=[]; result{i}=data; end result The result is a cell a...

Delete specific numbers from cell array

result=cell(1,20); for i=1:20 data=p2(:,i); data(data==0)=[]; result{i}=data; end result The result is a cell a...

8 days ago | 1

| accepted

Answered

Matrix dimensions must agree.

May be both image are not having equal size, please modify. As there are elementwise multiplication in g and h lines. girl = im...

Matrix dimensions must agree.

May be both image are not having equal size, please modify. As there are elementwise multiplication in g and h lines. girl = im...

9 days ago | 1

| accepted

Answered

How can i do the related analysis in matlab

First Section: If I undestand the question correctly, you are looking for compare multiple arrays, is this? a1= [0 0 0 1 0 1]; ...

How can i do the related analysis in matlab

First Section: If I undestand the question correctly, you are looking for compare multiple arrays, is this? a1= [0 0 0 1 0 1]; ...

9 days ago | 0

| accepted

Answered

How to use the edge function to extract a curve from the photo, and then draw this curve on the coordinate system, and finally smooth the curve.

data=imbinarize(imread('image.jpeg')); result=edge(data); figure,imshow(result); [r,c]=find(result==1); figure,plot(c,r,'.')...

How to use the edge function to extract a curve from the photo, and then draw this curve on the coordinate system, and finally smooth the curve.

data=imbinarize(imread('image.jpeg')); result=edge(data); figure,imshow(result); [r,c]=find(result==1); figure,plot(c,r,'.')...

9 days ago | 0