Expert Answer
- Comment
Note: Please note that you have posted 2 questions, in a single post. The first question with all its requirements is answered below. Please ask the second question in a separate post)
(*If any doubt, please let me know in the comments)
Matlab Code:
clc;
clear all;
close all;i1 = imread('coins.png');
imshow(i1); %showing the read image
Mask=zeros(size(i1)); %creating mask the same size of image
Mask(:)=255;
[x,y] = ginput(2); %this will store the coordinates of points clicked by user
Mask(min(y):max(y),min(x):max(x)) = 0;
i2 = bitor(i1,Mask);
imshow(i2); %show the resulting imageInput image used for testing:
Output Screenshot (After clicking on 2 points on the image):
ليست هناك تعليقات:
إرسال تعليق