Instead of read the whole image first and then take part of feature, but only read this feature part of the image from the beginning, how to do it? Using fread function?

1 回表示 (過去 30 日間)
How to read the feature part of the image (without white color area)? Izit using fread function?
  2 件のコメント
Jan
Jan 2017 年 5 月 22 日
The question is not clear. What is "the feature part" and how is it defined in your code? In which format is the image saved? Whyt is the benefit of reading the image partially? Most likely it will be much faster to perform the cropping when the image is imported into the RAM. So why do you want to apply a very complicated import function?
Mei Synn Tan
Mei Synn Tan 2017 年 6 月 15 日
編集済み: Mei Synn Tan 2017 年 6 月 15 日
Dear Jan Simon Here is the details of my question, hope you understand it. https://www.mathworks.com/matlabcentral/answers/344340-which-invariant-image-matching-do-i-use
Thanks

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

回答 (1 件)

Walter Roberson
Walter Roberson 2017 年 6 月 15 日
No, those are JPEG images. There is no provided way to read only part of a JPEG image.
Looking around, I find a reference that claims that libjpeg supports reading JPEG images line by line. Considering that JPEG are divided into blocks, I suspect that would involve reading and decoding information and throwing out most of it -- either that or perhaps it only supports reading groups of 8 lines at a time. Either way, it certainly does not support reading only irregular parts of an image.
  2 件のコメント
Mei Synn Tan
Mei Synn Tan 2017 年 6 月 16 日
Dear Walter Roberson, if the images is in PNG format. Possible to read part of a png image? Thanks
Walter Roberson
Walter Roberson 2017 年 6 月 16 日
No, PNG files have no way of handling this kind of situation.
TIFF files are permitted to be written in "tiles" that can be read separately -- so for example you might happen to know that there are three tiles between the left edge of the image and the left side of the leaves around the stem, below the petals and above the leaves. If you happened to know that, and if it happened that everything aligned just right, then with TIFF images you could skip those tiles as you read the others. This would typically be slower than reading the whole thing in this circumstance, as you would need to be going back and forth between MATLAB and libtiff all the time instead of staying inside libtiff to read the entire image.

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

カテゴリ

Help Center および File ExchangeImage Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by