필터 지우기
필터 지우기

Remove space around generated image

조회 수: 3 (최근 30일)
fiona rozario
fiona rozario 2017년 2월 12일
댓글: fiona rozario 2017년 2월 12일
I am encrypting an image and have generated the encrypted image matrix of dimension (183x275x3). But when I display the image (seen as dots in the attached file) it has some extra white space around it which alters its dimensions to (415x253). How do I get rid of the white space? Original image also attached...

답변 (1개)

Jan
Jan 2017년 2월 12일
편집: Jan 2017년 2월 12일
It is very starnge, that you get a 415x253 image after encrypting an 183x275x3 array. I guess, that you display the encrypted image using imshow or image and take a screenshot afterwards, which is taked as indexed image. This does not sound convincing.
Please post any details. I assume, the output of the encryption function is the wanted encrypted image already and you do not need the indirection of displaying it at first. Then there is no need to remove a border.
  댓글 수: 1
fiona rozario
fiona rozario 2017년 2월 12일
I am following these steps:
  1. reading an image,
  2. separating the RGB channels,
  3. splitting R, G and B into two sub components each (so i have 6 matrices now)
  4. encrypting each of the 6 matrices indiividually
  5. build the R, G and B channels again from the sub-parts
  6. build the image again from the RGB channels
The matrix created in the workspace shows (183 x 275 x 3).
Does the data type make any difference? From step 3 onwards the datatype has changed to 'double' instead of 'uint8'...

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

카테고리

Help CenterFile Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by