Created
September 21, 2011 23:03
-
-
Save dennda/1233573 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint16_t *remapped = (uint16_t*) malloc(width * height * sizeof(uint16_t)); | |
vImage_Buffer src = {imgData, | |
(vImagePixelCount) height, | |
(vImagePixelCount) width, | |
bytes_per_row | |
}; | |
vImage_Buffer dst = {remapped, | |
(vImagePixelCount) height, | |
(vImagePixelCount) width, | |
bytes_per_row | |
}; | |
double max_intensity = pow(2, bits_allocated); | |
vImageEndsInContrastStretch_PlanarF(&src, &dst, NULL, 10, 10, 1000, 0, | |
max_intensity, kvImageNoFlags); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment