Extract a hidden message from image
1 回表示 (過去 30 日間)
古いコメントを表示
I'm trying to write a matlab code to extract a hidden message from a given image. The hidden message is the first half of the odd part of this image. Whenever I run my code I get a black image. Any suggestions?
image=imread('hidden.png');
new=fliplr(image);
odd=(image-new)/2 ;
imshow(odd);
3 件のコメント
採用された回答
Image Analyst
2016 年 5 月 4 日
Make the image brighter by using [] in imshow():
imshow(odd, []);
2 件のコメント
Image Analyst
2016 年 5 月 5 日
I do this and the image shows up. granted, it's a bit dark but considering what you're doing to it, that's not unexpected.
rgbImage = imread('peppers.png');
subplot(2,2,1);
imshow(rgbImage);
fontSize = 18;
title('Original Image', 'FontSize', fontSize);
new = fliplr(rgbImage);
subplot(2,2,2);
imshow(new);
title('New Image', 'FontSize', fontSize);
odd = (rgbImage - new)/2 ;
subplot(2,2,3);
imshow(odd);
title('Odd Image', 'FontSize', fontSize);

その他の回答 (2 件)
Walter Roberson
2016 年 5 月 4 日
I am going to guess here:
wid = size(YourImage,2);
hwid = floor(wid/2);
odd = (double(YourImage(:,1:hwid)) - double( fliplr(YourImage(:,end-hwid+1:end)) )) / 2;
shifted_odd = odd - min(odd(:));
scaled_odd = shifted_odd ./ max(shifted_odd(:));
imshow(scaled_odd);
2 件のコメント
Walter Roberson
2016 年 5 月 4 日
You might need
imshow(scaled_odd, [])
Remember, though, that the hidden image cannot be a colored image, because colored images require 3 dimensional arrays but you are working with two dimensional arrays.
Ashton M Spillman
2020 年 10 月 18 日
bro idk
1 件のコメント
Image Analyst
2020 年 10 月 19 日
編集済み: Image Analyst
2020 年 10 月 19 日
Then don't feel compelled to post an answer.
Anyway, I posted a full complete demo 4 and a half years ago for Nemo, which worked despite him not accepting any answer.
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!