Hello, I need help with the following question in MATLAB for digital image processing,
thank you for your help in advance
function [L,M]=lsbhide(hide_pic,M)
pic_data=imread(hide_pic); % open hide picture
secret=fopen(M,'rb'); % open secret file
[M,L]=fread(secret,'ubit1'); % read secret file as bin array
% L is the length of seceret file
[n,m]=size(pic_data); % n is width,m is height*3
m=m/3;
% m*n is the max size to save secret
if (m*n*3<L)
msg=msgbox('your hide picture is too small','size error','error','modal');
pause(1);
if (ishandle(msg))
close(msg);
end
end
latest_data=pic_data;
count=1;
for i=1:m % width
for j=1:n % height
for k=1:3 % RGB
latest_data(i,j,k)=pic_data(i,j,k)-mod(pic_data(i,j,k),2)+M(count,1);
if count==L
break;
end
count=count+1;
end
if count==L
break;
end
end
if(L==count)
break;
end
end
imwrite(latest_data,'hidden1.jpg','bmp');
CC=M;
count1=1;
for i=1:m
for j=1:n
for k=1:3
CC(count1)=latest_data(i,j,k)-pic_data(i,j,k);
if count1==L
break
end
count1=count1+1;
end
if count1==L
break
end
end
if count1==L
break
end
end
If u have any doubts refer steganography code.. Both are same.
Hello, I need help with the following question in MATLAB for digital image processing, thank you ...
Write a function in Matlab (or Java) as follows: function Img2=Convolution(Img, mask); %Input: Img is the original image data matrix, mask is square matrix, could be 2x2, 3 x 3 or size %Output: Img2 is the result image Test the function. Read an image file, apply the edge detection filters (i.e., masks) to see whether it works well. Try at least 3 filters: Sobel, Robert, Prewitt.
Image processing Matlab problem. Could you please help me to write a Matlab code to read images, equalize contrasts, covert images to grayscale and binary, then display on same windows. Then perform SOBEL and CANNY edge detection on images. Final make MATLAB to count the number of circles in images (circles and red circles) And how can we distinguish circles by color? and how to count number of red, green and blue circles separately for example.
I only need help for the last question "What Went Wrong?". Thank you! After seeing the problem, your classmate Alice immediately argues that we can apply a linear regression model, as the labels are numbers from 0-9, very similar to the example we learned from Unit 1. Though being a little doubtful, you decide to have a try and start simple by using the raw pixel values of each image as features. Alice wrote a skeleton code run_linear_regression_on_MNIST in main.py,...
Compute the following problems using Math Lab. Instructions: Answer All Questions using MATLAB commands. Question 1. Create a vector of the even whole numbers between 31 and 75. Question 2. Let x [2516] a. Add 16 to each element b. Add 3 to just the odd-index elcments c. Compute the square root of each element d. Compute the square of each element Question 3. Let x 13 268T and y [4 1 3 5] (NB. x and y should be...