#Image Processing

#Learner Alma #TezpurUniv

Answered

Principal Component Analysis (PCA) in matlab

To perform principal component analysis directly on the data matrix, use pca. Matlab Doc Suggested: pcacov does not standardi...

Principal Component Analysis (PCA) in matlab

To perform principal component analysis directly on the data matrix, use pca. Matlab Doc Suggested: pcacov does not standardi...

4 hours ago | 0

Answered

Figure but no plot

Here is the issue, the rest code is perfectly OK x=0:0.1:diffmax %..^ ..^ not semicolon, its colon

Figure but no plot

Here is the issue, the rest code is perfectly OK x=0:0.1:diffmax %..^ ..^ not semicolon, its colon

5 hours ago | 0

Answered

How can I create a 3D matrix?

mat_3d=rand(rows_num,columns_mum,depth); Here depth represents channel number/number of plane slices Your query ('how can comb...

How can I create a 3D matrix?

mat_3d=rand(rows_num,columns_mum,depth); Here depth represents channel number/number of plane slices Your query ('how can comb...

5 hours ago | 0

Answered

Concatenate signals ( sine wave and a line )

total=[a X Y]; Here "a" is row data, so you must have row-wise (horizontally) concatenate

Concatenate signals ( sine wave and a line )

total=[a X Y]; Here "a" is row data, so you must have row-wise (horizontally) concatenate

1 day ago | 1

Answered

The way to make an array using function_hundle(関数ハンドルを用いた配列の作り方)

Option 1: i=1:5; x=2; f=i*x Here resultant f array itself represents the f(1), f(2)..respectively depends on array length of...

The way to make an array using function_hundle(関数ハンドルを用いた配列の作り方)

Option 1: i=1:5; x=2; f=i*x Here resultant f array itself represents the f(1), f(2)..respectively depends on array length of...

2 days ago | 0

Answered

How to count the number of pixels in each grid ?

"I want I want to count the number of pixels in each grid" As I answered your previous question, assuming you could use the gr...

How to count the number of pixels in each grid ?

"I want I want to count the number of pixels in each grid" As I answered your previous question, assuming you could use the gr...

2 days ago | 0

Answered

How do I print the final value of RMSE on the command line?

data=sqrt(mean((data1-data)^2)) fprintf('The RMSE Vale: %f',data); Please modify, as per requirements

How do I print the final value of RMSE on the command line?

data=sqrt(mean((data1-data)^2)) fprintf('The RMSE Vale: %f',data); Please modify, as per requirements

2 days ago | 0

Answered

How to get all matrix values in 3X4 sub-matrix from an M x N matrix(Template Matching)

You can do that multiple ways: im_blocks=mat2cell(grayImage,M/3*ones(1,3),N/4*ones(1,4)); Please ensure that, MxN are perfec...

How to get all matrix values in 3X4 sub-matrix from an M x N matrix(Template Matching)

You can do that multiple ways: im_blocks=mat2cell(grayImage,M/3*ones(1,3),N/4*ones(1,4)); Please ensure that, MxN are perfec...

3 days ago | 0

Answered

Recombine cell arrays to produce a new image

"now how to i recombine all cells to create the a new picture with all the cells" cell2mat Matlab Docs: Convert cell array to ...

Recombine cell arrays to produce a new image

"now how to i recombine all cells to create the a new picture with all the cells" cell2mat Matlab Docs: Convert cell array to ...

3 days ago | 0

Answered

"For Loop" in terms of angle theta

clc;clear %set value for w in (rad/s) w=-418.8790205; %Set crank radius in (m) r=0.047; %create rotational velocity matrix...

"For Loop" in terms of angle theta

clc;clear %set value for w in (rad/s) w=-418.8790205; %Set crank radius in (m) r=0.047; %create rotational velocity matrix...

3 days ago | 1

| accepted

Answered

Error: Not Enough Input Arguments

Once, I tried to reproduce the same error, I could not >> p = [3 -2 -4]; roots(p) ans = 1.5352 -0.8685 One Suspect:...

Error: Not Enough Input Arguments

Once, I tried to reproduce the same error, I could not >> p = [3 -2 -4]; roots(p) ans = 1.5352 -0.8685 One Suspect:...

3 days ago | 0

| accepted

Answered

Checking if a value is equal to zero or no ? with the problem of floating-point numbers !

%% A = [0.0850 0.2130 0.1480 0.2220 0.2430 0.0890] if logical(sum(A(:)))==1 "yes" end More: A = 0...

Checking if a value is equal to zero or no ? with the problem of floating-point numbers !

%% A = [0.0850 0.2130 0.1480 0.2220 0.2430 0.0890] if logical(sum(A(:)))==1 "yes" end More: A = 0...

3 days ago | 1

Answered

how to bright a picture gradually

Suggestion: Please see the Gamma Scaling or Power low trasnformation, you can adjust the values of Gamma or Constant as per desi...

how to bright a picture gradually

Suggestion: Please see the Gamma Scaling or Power low trasnformation, you can adjust the values of Gamma or Constant as per desi...

3 days ago | 0

Answered

syntax error in code

temp1=2*x_be(n)*((x_be(n)^2+y_be(n)^2)^2)-2*gamma*y_be(n)*(x_be(n)^2 +y_be(n)^2)-4*x_be(n)*((gamma*h)^2)+2*x_be(n)*x_be(n)^2+y_b...

syntax error in code

temp1=2*x_be(n)*((x_be(n)^2+y_be(n)^2)^2)-2*gamma*y_be(n)*(x_be(n)^2 +y_be(n)^2)-4*x_be(n)*((gamma*h)^2)+2*x_be(n)*x_be(n)^2+y_b...

4 days ago | 0

Answered

correlation of 2 signals

clc; clear;close all; %% t=linspace(0,1000,100001); %in ms xs=randn(1,100001); subplot(3,1,1),plot(t,xs); title('SIGNAL RE...

correlation of 2 signals

clc; clear;close all; %% t=linspace(0,1000,100001); %in ms xs=randn(1,100001); subplot(3,1,1),plot(t,xs); title('SIGNAL RE...

4 days ago | 0

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...

6 days 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

6 days 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...

7 days 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...

7 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...

8 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 ...

10 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 = [...

10 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)]

11 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; ...

11 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 ...

11 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...

11 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 ...

11 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...

12 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...

12 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...

12 days ago | 0