3

I am trying to include vImage based functionality in my code. But compile fails - it doesnt even seem to recognize the functions/variables at all.

But at the same time vDSP based code seems to work fine. Also, the code compiles in simulator but fails in the device.

A sample code (which fails) is as follows

#import "test.h"
#include <Accelerate/Accelerate.h>

@implementation test 

-(void) test1{
  DSPComplex d ={1.0, 2.0};
  d;
  vImagePixelCount x = 3;
  x;
}
@end

Here, DSPComplex which is DSP based code, in the same framework - works fine, while vImagePixelCount - which is vImage based code - it fails. Can anyone help me on this? Is vImage not included in iOS4 ?

I am using iOS4.2 in the device.

Stephen Canon
  • 103,815
  • 19
  • 183
  • 269
Raj
  • 43
  • 3
  • See also [Does anyone have example code for vImage processing on iOS?](http://stackoverflow.com/questions/4402152/does-anyone-have-example-code-for-vimage-processing-on-ios) – Brad Larson Dec 11 '10 at 19:22

2 Answers2

11

It's worth noting here, since this is the top google result for "vImage iOS", that support for vImage has since been added to iOS 5.

The vImage reference for iOS is available here: https://developer.apple.com/library/ios/documentation/Performance/Conceptual/vImage/Introduction/Introduction.html

Ben Swanson
  • 1,166
  • 14
  • 17
0

vImage is not available on iOS at the moment. Compare these two documents:

The one has the vImage functions, the other one doesn't. The reason it works in the Simulator is that the Simulator actually uses the Mac frameworks and not the iOS versions.

Ole Begemann
  • 135,006
  • 31
  • 278
  • 256