필터 지우기
필터 지우기

Combining slices of image

조회 수: 3 (최근 30일)
Rohit Kharat
Rohit Kharat 2022년 1월 18일
답변: yanqi liu 2022년 1월 19일
I have to combine two grayscale image with a RGB image. While combining I am facing the issue of different size of matrices and I do not want to use 'imtile' function. How can I approach these task?
  댓글 수: 2
Walter Roberson
Walter Roberson 2022년 1월 18일
In order for us to suggestions that are usable for you, you are going to need to tell us more about why imtile() is not suitable for your purpose.
DGM
DGM 2022년 1월 18일
If you need to edge-concatenate two images, you will need to match their corresponding geometry. At that point, you can use basic concatenation (e.g. cat() or []).
In order to make their geometry compatible, you can:
  • resize one or both images (see imresize())
  • crop the larger image (see imcrop())
  • pad the smaller image (see padarray())
In order to make monochrome and RGB images match on dim3, you can either
  • expand the single-channel image (see repmat())
  • collapse the multichannel image (see rgb2gray())
That said, i'm only assuming you want to concatenate based on the mention of imtile(). As you don't want to use imtile(), I'm reluctant to recommend other tools that can directly do similar things; after all, if imtile() doesn't do what you want, maybe they don't either. If by "combine", you mean something other than concatenation, you'll have to clarify.

댓글을 달려면 로그인하십시오.

답변 (1개)

yanqi liu
yanqi liu 2022년 1월 19일
yes,sir,may be use imresize to make them to same size,and cat them to one matrix
if possible,please upload your image files to do some analysis

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by