0

I am a new user on image processing via Matlab. My first aim is applying the article and comparing my results and authors' results.
The article can be found here: http://arxiv.org/ftp/arxiv/papers/1306/1306.0139.pdf

First problem, Image Quality: In Figure 7, masks are defined but I couldn't reach the mask data set, and I use the screenshot so image quality is low. In my view, it can effect the results. Is there any suggestions?

Second problem, Merging images: I want to apply mask 1 on the Lena. But I don't want to use paint =) On the other hand, is it possible merging the images and keeping the lena?

AlessioX
  • 3,167
  • 6
  • 24
  • 40
cndkrt
  • 79
  • 10

2 Answers2

0

You need to create the mask array. The first step is probably to turn your captured image from Figure 7 into a black and white image:

Mask = im2bw(Figure7, 0.5);

Now the background (white) is all 1 and the black line (or text) is 0. Let's make sure your image of Lena that you got from imread is actually grayscale:

LenaGray = rgb2gray(Lena);

Finally, apply your mask on Lena:

LenaAndMask = LenaGray.*Mask;

Of course, this last line won't work if Lena and Figure7 don't have the same size, but this should be an easy fix.

Cynthia GS
  • 522
  • 4
  • 20
  • Thank you @Cynthia GS! As you told last line doesn't work. Should I change the class of Mask? Name Size Bytes Class Attributes I 256x256 65536 uint8 M 256x256x3 196608 uint8 Mask 256x256 65536 logical – cndkrt Apr 02 '16 at 20:30
0

First of all, You have to know that this paper is published in archive. when papers published in archive it is always a good idea to know more about the author and/or the university that published the paper. TRUST me on that: you do not need to waste your time on this paper.

I understand your demand: but it is not a good idea to do get the mask by doing print screen. The pixel values that can be achieved by using print screen may not be the same as the original values. The zoom may change the size. so you need to be sure that the sizes are the same.

you can do print screen. past the image. crop the mask. convert rgb to gray scale. threshold the gray scale to get the binary.

if you saved the image as jpeg. distortions because of high frequency edges will change edge shape.

Bashar Haddad
  • 369
  • 2
  • 10
  • Actually, I was asking for this question @dfri `I=imread('lena_gray_256.tif'); M=imread('M1.tif'); M1=im2bw(M,0.5); ML=I; ML(M1==0)= 0; imshow(ML);` And, solved!! I am thankful all! – cndkrt Apr 04 '16 at 20:07