vImage is a library of high-performance image-processing routines provided by Apple in macOS, iOS, tvOS, and watchOS. It includes functions for image manipulation—convolutions, geometric transformations, histogram operations, morphological transformations, and alpha compositing—as well as utility functions for format conversions and other operations.
Questions tagged [vimage]
62 questions
0
votes
0 answers
How to fill a vImage buffer with a color - Cocoa Objective C
I want to fill an VImage buffer with black color. I have found that using vImageBufferFill_ARGB8888(<#const vImage_Buffer *dest#>, <#const uint8_t *color#>, <#vImage_Flags flags#>) I can fill the buffer but I am not sure how to pass the color…

prabhu
- 1,158
- 1
- 12
- 27
0
votes
1 answer
Image Quality getting affected on scaling the image using vImageScale_ARGB8888 - Cocoa Objective C
I am capturing my system's screen with AVCaptureSession and then create a video file out of the image buffers captured. It works fine.
Now I want to scale the image buffers by maintaining the aspect ratio for the video file's dimension. I have used…

prabhu
- 1,158
- 1
- 12
- 27
0
votes
1 answer
how to free vImage buffers after operation completed in IOS
I try to make some histogram calculations using vImage buffers in Accelerate framework and I supply camera image as UIimage converted from CVpixelbuffer. Algorithm works with no error however processed camera image data on the screen is very slow.…

baymak
- 89
- 9
0
votes
1 answer
Scale image in CVImageBuffer
I have a task - to scale down an image which I got from the camera. I need it in order to do heavy-lifting operations on smaller version of the image which will help me to save some processing power.
I decided to go with vImage_Buffer from…

Eugene Alexeev
- 1,152
- 12
- 32
0
votes
2 answers
vImage on the Mac: unable to convert from Core Video
Edit: Fixed. A working sample is at https://github.com/halmueller/vImage-mac-sample.
I'm trying to read the feed of a MacBook Pro's Facetime camera to process it with the vImage framework. I'm following the example in Apple's VideoCaptureSample,…

Hal Mueller
- 7,019
- 2
- 24
- 42
0
votes
1 answer
How to use vImageMatrixMultiply in Swift 3?
I am going to apply a matrix to a CGImage using Accelerate framework.
First, I converted a CGImage to vImage_Buffer,
let bitmapInfo: CGBitmapInfo = [ .floatComponents,
CGBitmapInfo( rawValue:…
user5563935
0
votes
2 answers
UIImage Gaussian Blur with vImage
I am trying to find a faster way to generate Gaussian Blur image, this blog works great with most of the image.
But when image has transparent backgroudcolor, the blured image looks bad
The code below is copied from the blog:
-(UIImage…

Shawn Wang
- 2,314
- 1
- 16
- 19
0
votes
1 answer
crash in vImage convert function
I want to convert a planar greyscale image where each pixel is stored in 32-bit floats into a XRGB image on Mac OS X. vImage seems to be the most appropriate tool. I wrote a short function that does that, but it crashes in the vImage call with a…

Jean-Denis Muys
- 6,772
- 7
- 45
- 71
0
votes
1 answer
Issue in computing the histogram of an image using vImageHistogramCalculation
I have used vImageHistogramCalculation in my current application for calculating the histogram of image and I am getting EXC_BAD_ACCESS in some cases.I went through the cases as follows-
- (void)histogramForImage:(UIImage *)image {
vImage_Buffer…

Imran
- 1,715
- 2
- 20
- 42
0
votes
1 answer
UIImageEffects: white image when Gaussian radius above 280, vImageBoxConvolve_ARGB8888 issue?
I'm using the Gaussian blur algorithm found in Apple's UIImageEffects example:
CGFloat inputRadius = blurRadius * inputImageScale;
if (inputRadius - 2. < __FLT_EPSILON__)
inputRadius = 2.;
uint32_t radius = floor((inputRadius * 3. * sqrt(2 *…

Archagon
- 2,470
- 2
- 25
- 38
0
votes
1 answer
vImage_Buffer not rendering into CGContext, Why?
The code below is an attempt to get an image, extract its components into a vImage_Buffer and then loop through this buffer and grab each component and invert the red and blue channels by populating an outputBuffer. After that I want to take the…

Horatiu Paraschiv
- 1,750
- 2
- 15
- 37
0
votes
1 answer
vImageAlphaBlend crashes
I'm trying to alpha blend some layers: [CGImageRef] in the drawLayer(thisLayer: CALayer!, inContext ctx: CGContext!) routine of my custom NSView. Until now I used CGContextDrawImage() for drawing those layers into the drawLayer context. While…

Enie
- 649
- 5
- 18
0
votes
2 answers
How can I rotate and paste image with alpha channel using vImage in ios?
I have a large image A and another image B which has an alpha channel that I would like to paste into A. I want to apply an affine transform to B before I stick it on to A. What are the steps to doing this in c++ using vImage in iOS?

twerdster
- 4,977
- 3
- 40
- 70
0
votes
1 answer
ColorSync and vImage producing bad output
I'm trying to capture the contents of the display and convert from the display's colorspace to sRGB. I'm trying to use vImage and the low level ColorSync transform APIs to do this, but the output has a weird doubling of pixel blocks. My…

Matt Ronge
- 117
- 7
0
votes
1 answer
I need help optimizing BGR888 blitting to NSView
This is best I've come up with for blitting a 24-bit BGR image out to an NSView.
I did trim a significant amount of CPU time by ensuring that the NSWindow host also had the same colorSpace.
I think there are 4 or 5 pixel copies going on here:
in…

zzyzy
- 973
- 6
- 21