iOS + C++ 中的图像处理在 iphone 应用程序中
Image processing in iOS + C++ in iphone app
我的第一个问题是,如果我使用 opencv 库在 C++ 中编写一个类来检测图像中的任何对象并在 objective-C(xcode 项目)中调用该 C++ 类,那么这种技术会起作用吗?
和
第二个问题是,如何在我的iPhone应用程序项目中添加c /c ++类,并在传统的ViewController Class中使用它。
到目前为止,我所做的是
:创建了一个具有一个视图控制器的 TabView 应用程序。:在该视图控制器中添加了一个按钮。:添加了一个 File.c 类,它只是打印字符串。:在我的ViewController.h和ViewController.m类中导入了"File.c",例如
MY ViewController.h 类
#import <UIkit/UIkit.h>
#import "file.c"
MY ViewController.m 类
#import "FirstViewController.h"
#import "File.c"
现在在按钮的操作上,我想调用我已经在项目中添加的 C 类。我希望得到好的和有益的答案。
问候
File.c
#ifndef testC_File_c
#define testC_File_c
#include <stdio.h>
void say_hello() {
printf("Hello World!");
}
#endif
ViewController.h
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
- (IBAction) buttonDown:(id)sender;
@end
ViewController.mm
#import "ViewController.h"
#include "File.c"
@interface ViewController ()
@end
@implementation ViewController
- (IBAction) buttonDown:(id)sender
{
say_hello();
}
- (void)viewDidLoad
{
[super viewDidLoad];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}
@end
相关文章:
- 试图在visual studio上用C++创建一个桌面应用程序
- FFmpeg:制作一个应用程序比直接使用ffmepg更好吗
- 在C应用程序中运行C++(带有STL)函数
- 使用VerQueryValue检索应用程序的文件描述
- Qt C++静态thread_local QNetworkAccessManager是线程应用程序的好选择吗
- 在不编写任何Objective-C代码的情况下,是否可以在C 中开发iPhone/iPad应用程序
- iOS + C++ 中的图像处理在 iphone 应用程序中
- 如何从 C Microsoft PC 应用程序向 iPhone 发送 APNS 推送通知
- fbDidLogin在iPhone应用程序上从C++调用时未启动
- 网络应用程序可以在模拟器中运行,但不能在iPhone上运行
- 是否可以只使用c++制作一个iPhone应用程序
- iPad/iPhone应用程序在Windows操作系统上用C++开发
- 需要一些关于iPhone应用程序的C++服务器的建议
- 编写简单的windows服务器应用程序(Visual c++),使iPhone / Android可以通过Wifi检索值
- 在iPhone xcode应用程序中,是否可以声明一个具有全局作用域的指针?
- Xcode iPhone应用程序的问题,应用程序不关闭广告点击
- 如何通过蓝牙将硬件设备连接到Iphone应用程序
- 在Windows上开发iPhone应用程序
- 如何在iPhone应用程序中使用FLAC
- 从iphone应用程序调用c++ cocoa touch静态库