how to registering an Image?

6 visualizzazioni (ultimi 30 giorni)
Isee You
Isee You il 20 Giu 2013
so i can get final image like this(this image from another example) http://s16.postimg.org/3z0zh2w0l/image.jpg
i try to use this code but it dose not work i get error
  2 Commenti
Shashank Prasanna
Shashank Prasanna il 20 Giu 2013
What is the error?
Isee You
Isee You il 21 Giu 2013
xbegin =
50
xend =
561
ybegin =
-219
yend =
292
Subscript indices must either be real positive integers or logicals.
Error in try_regist (line 84)
extracted_onion = peppers(ybegin:yend,xbegin:xend,:);

Accedi per commentare.

Risposte (2)

Alex Taylor
Alex Taylor il 21 Giu 2013
Looking at these images, I see at least two potential problems:
1) Visually, it's tough for me to see where the regions of alignment are in these two images. This may be a very tough registration problem.
2) The resolution of these two images looks like it may be quite different. If this is the case, Normalized Cross Correlation will not work. A straightforward use of correlation is only translation invariant.
You might want to take a look at imregister/imregtform as an alternative algorithm.
- Alex

Alex Taylor
Alex Taylor il 21 Giu 2013
After looking again, I can see the features that correspond in these two images. If you don't have a lot of images like these to work with in a batch, the easiest path to success will probably be manually selecting the point correspondences using cpselect and then using cp2tform/imtransform to obtain your registered image. I did this and obtained reasonable results.
help cpselect
  3 Commenti
Image Analyst
Image Analyst il 22 Giu 2013
Where did the first image come from? It looks like it's segmented and masked from something, possibly the first image which means that they'd already be registered. Anyway, did you try imregister like Alex suggested? Though I have doubts because I just don't see enough information in your first image to register with any image at all.
Isee You
Isee You il 23 Giu 2013
yes my first image comes from segmented and masked and some other process . "Image Analyst" my project is detect cancer in liver from CT image. i try imregister i got this image http://s18.postimg.org/nh74dipm1/untitled.jpg not like i want
thank you every one "Alex Taylor" "Image Analyst" i use this code and i got this image http://s22.postimg.org/w4rwb9ek1/semi_final.jpg
bw = im2bw(processed_image);
imshow(bw);
Ifill = imfill(bw,'holes');
imshow(Ifill);
Iarea = bwareaopen(Ifill,1);
imshow(Iarea);
boundary = bwboundaries(Iarea);
[m,n] = size(boundary);
imshow(original); hold on;
for k = 1 : m % Loop through all blobs.
b = boundary{k};
plot(b(:,2),b(:,1),'r','LineWidth',3)
end

Accedi per commentare.

Categorie

Scopri di più su Biotech and Pharmaceutical in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by