1
votes

I have a 112x92 image, img.jpg, say. I would like to have several images that look-alike with it. Is it possible to be done using matlab? What I have tried was as follow:

A=imread(img.jpg)

It will give 112x92 uint8 matrix

I tried to add A with some uint8 matrix B. However, I didn't get what I wanted. Could anyone help me please? I am really newbie in image processing

1
There are several ways you could do it. Do you want to add noise, or filter the image maybe? Please explain more clearly what you mean by "look-alike". How would you say an image is looks like another? - Benoit_11
@Benoit_11: yes, indeed. I'd like to add noise, change ilumination, or changing pose (like little turned, etc), if possible. How do I do that? - Jlamprong
If you want to change the pose, there is an excellent function called jitterImage in Piotr Dollar's toolbox. Download the entire toolbox, set it up (quite easy) and run jitterImage.m to change pose. - Autonomous
@ParagS.Chandakkar: Thank a lot. Very useful toolbox. - Jlamprong

1 Answers

3
votes

Not sure of exactely what you are after, but here are a few things to get you strated:

I=imread('peppers.png');

Rotation:

rotI=imrotate(I, 45, 'crop');

image 1

Added noise:

noisyI=imnoise(I, 'salt & pepper', 0.3);

image 2

Directional shear:

tform = affine2d([1 0 0; .3 1 0; 0 0 1]);
shearedI = imwarp(I,tform);

image 3

Projective distortion:

theta = 1;
tform = projective2d([cosd(theta) -sind(theta) 0.001; sind(theta) cosd(theta) 0.001; 0 0 1]);
projI = imwarp(I,tform);

image 4