why i got diffrent location of crop when i change the image im using btw im using the same value of coordinate but the location is diffrent

7 件のコメント

KALYAN ACHARJYA
KALYAN ACHARJYA 2021 年 11 月 21 日
Can you more specific please?
MOHAMED GILANI
MOHAMED GILANI 2021 年 11 月 21 日
im working on diffrent set of image and i need to specife or crop a certen region in thees images but when i set the coordinate of the targeted location it miss with the other images
KALYAN ACHARJYA
KALYAN ACHARJYA 2021 年 11 月 21 日
May be target regions are not same spatial postion in all co-ordinates? Because the image capturing system movement or object movement, more, there can be many reasons for this.
MOHAMED GILANI
MOHAMED GILANI 2021 年 11 月 21 日
its a MRI image
do u think?
Walter Roberson
Walter Roberson 2021 年 11 月 21 日
Movement is possible within an MRI. Depending on the instrument, it might be necessary to do image registration between slices.
I suggest that you take two slices that appear to be cropped differently, and use imshowpair() . That will highlight the differences in the slices. If the slices are different Z panes within the same organ, then you would expect some differences, but the images would be expected to have the same centers. If imshowpair() gives the impression that the images are not aligned, then you might need image registration.
DGM
DGM 2021 年 11 月 21 日
Provide a simplified and concrete example demonstrating the problem.
Matt J
Matt J 2021 年 11 月 21 日
Maybe the images are not all the same size. Therefore, the cropping coordinates don't cover the same spatial region in all cases.

サインインしてコメントする。

 採用された回答

yanqi liu
yanqi liu 2021 年 11 月 22 日

0 投票

sir,may be use the rate,such as
clc; clear all; close all;
im = imread('cameraman.tif');
sz = [size(im, 1) size(im, 2)];
rect = round([sz(2)/2 sz(1)/2 sz(2)*0.2 sz(1)*0.3]);
im2 = imcrop(im, rect);
figure;
subplot(1, 2, 1); imshow(im);
hold on; rectangle('position', rect, 'EdgeColor', 'g', 'LineWidth', 2)
subplot(1, 2, 2); imshow(im2);
im = imread('football.jpg');
sz = [size(im, 1) size(im, 2)];
rect = round([sz(2)/2 sz(1)/2 sz(2)*0.2 sz(1)*0.3]);
im2 = imcrop(im, rect);
figure;
subplot(1, 2, 1); imshow(im);
hold on; rectangle('position', rect, 'EdgeColor', 'g', 'LineWidth', 2)
subplot(1, 2, 2); imshow(im2);

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeBiomedical Imaging についてさらに検索

質問済み:

2021 年 11 月 21 日

回答済み:

2021 年 11 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by