How do I generate missing entries using random binary masks on an Image?

1 回表示 (過去 30 日間)
fadams18
fadams18 2019 年 2 月 13 日
コメント済み: fadams18 2019 年 2 月 13 日
Hello,
How to I produce incomplete matrix with missing values in the right image.
Screenshot from 2019-02-13 11-09-01.jpg
(A) original image (B) incomplete image

採用された回答

KSSV
KSSV 2019 年 2 月 13 日
  1 件のコメント
fadams18
fadams18 2019 年 2 月 13 日
After going through the code. It seems to be imprinting random artifacts on to the image
untitled.jpg
A = imread('dataset/1.jpg');%original image
G = double(A);
G(rand(size(G))<0.50) = NaN;
Gnan = G;
figure
image(uint8(Gnan))
title 'Corrupted - 50%'
I achieved this by just extracting this code from their program. However is there a way to add text instead of NaN?

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by