Data loss in image
古いコメントを表示
I have an encrypted image,I wantit to like these so I can be able to test for data loss

7 件のコメント
Jan
2022 年 10 月 15 日
"I wantit to like these" - this is not sufficient to clearify, what you want to achieve. Which details matter? What are the inputs? What have you tried so far? which Matlab realted problems did occur?
dani elias
2022 年 10 月 15 日
Jan
2022 年 10 月 15 日
@dani elias: "The image is encrypted,I have managed to recover the image to its original form when I applied salt&pepper noise,speckle noise and Poisson noise." - you procide information, which does not have a relation to the problem, but important details, which would clarify the problem are still missing.
What are your inputs? "Encrypted images" is less clear than: uint8 RGB arrays? uint16 grayscale matrices? logical binary matrices?
Do you want to plot the black area? Then it is visible on the screen. I assume you want to set a square (or almost square, 25% need not be an integer) block of data to 0 (not "black")?
Then a compact and exhaustive version of your question would be:
data = randi([0, 255], 400, 400, 'uint8');
How to set an almost square block in the center to 0, which occupies X% of the pixels?
dani elias
2022 年 10 月 15 日
編集済み: Walter Roberson
2022 年 10 月 15 日
Walter Roberson
2022 年 10 月 15 日
No, MATLAB does not provide any functions that alter arrays based upon percentage sizes. You will need to take size() of the rectangle and multiply by the fraction to arrive at the target sizes.
dani elias
2022 年 10 月 15 日
Jan
2022 年 10 月 16 日
Remember that insertShape replies an RGB image.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Computer Vision with Simulink についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
