- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Ссылка скопирована
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Hi,
You can see, step is distance in bytes between adjacent lines. (This is from ippi.h file)
/* /////////////////////////////////////////////////////////////////////////////
// Name: ippiMalloc
// Purpose: allocates memory with 32-byte aligned pointer for ippIP images,
// every line of the image is aligned due to the padding characterized
// by pStepBytes
// Parameter:
// widthPixels width of image in pixels
// heightPixels height of image in pixels
// pStepBytes the pointer to the image step, it is an out parameter calculated
// by the function
//
// Returns: pointer to allocated memory or 0 if out of memory or wrong parameters
// Notes: free the allocated memory by the function ippiFree only
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
There are generally two ways of storing image data: interleaved and planar. With interleaved data, all the values for a given pixel are stored adjacently in memory, and with planar data all the pixels for a given color are stored together.
So, lets say you have CMYK data with a pixel height and width of 2. For interleaved data, the data would be stored as:
CMYKCMYKCMYKCMYK
where each character represents the color value for one colorant of one pixel. For example, the first "C" represents the cyan value for the first pixel.
With planar data, the data would be stored as:
CCCCMMMMYYYYKKKK
where all the data for a single colorant is stored adjacently.
So,a "plane" is all the image data associated with one color. In the example above, the "CCCC" represents the cyan plane, the "MMMM" represents the magenta plane, and so on.
As for the "step", this is used to align data on an efficient boundary. Let's say you had a 3x2 pixel image (3 horizontal and 2 vertical), but the computer accesses data more efficiently on 4 byte boundaries. Now the planar data would look like this:
CCCxCCCxMMMxMMMxYYYxYYYxKKKxKKKx
where each "x" is a filler byte used to adjust each line so the data for the next line is aligned to a 4-byte boundary.
(All the above assumes that there is one byte of data for each colorant for each pixel. There are other possibilities, but 8-bit color data is the most common.)

- Подписка на RSS-канал
- Отметить тему как новую
- Отметить тему как прочитанную
- Выполнить отслеживание данной Тема для текущего пользователя
- Закладка
- Подписаться
- Страница в формате печати