imshow() black image
Mostrar comentarios más antiguos
%% Extraction Step
Ex_watermark=zeros(8);
Watermarked_B=Watermarked_image(:,:,3);
c=0;
for i=1:64:64*64-63
c=c+1;
block_index=key(i:i+63);
blockB=double(reshape(B(block_index),[8,8]));
% discrete cosine transform:
dct_blockB=dct2(blockB);
% Singular Value Decomposition:
[Ub,Sb,Vb]=svd(dct_blockB(dct_idx));
Sbw=reference{i};
sigmaB=Sb(1); % Biggest Singular Value - Host
sigmaBW=Sbw(1); % Biggest Singular Value - Watermarked
% Extracting watermark image:
if sigmaBW>sigmaB
Ex_watermark(c)=1;
end
end
subplot(1,4,4),
imshow(Ex_watermark)
xlabel('Extracted Watermark');
8 comentarios
KSSV
el 22 de Ag. de 2020
Try
imshow(uint8(Ex_watermark))
Mostfa Abd El-Aziz
el 22 de Ag. de 2020
KALYAN ACHARJYA
el 22 de Ag. de 2020
Editada: KALYAN ACHARJYA
el 22 de Ag. de 2020
Try
imshow(Ex_watermark,[]);
If it doesnot work, then share the complete code (If possible) with test images.
KSSV
el 22 de Ag. de 2020
Check the class of dct_blockb and use the same class for Ex_watermark....if nor working share the code and data.
Mostfa Abd El-Aziz
el 23 de Ag. de 2020
KALYAN ACHARJYA
el 23 de Ag. de 2020
See the data types of dct_blockb and Ex_watermark, same??
Image Analyst
el 23 de Ag. de 2020
Mostfa, did you overlook where he said "if not working share the code and data." Not doing that is delaying a solution to your problem. If using [] in imshow() did not solve it, then your image is all zero.
Mostfa Abd El-Aziz
el 24 de Ag. de 2020
Respuestas (0)
Categorías
Más información sobre Watermarking en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!