ios - 如何使用 swift 语言在 xcode 中使图像提取具有本地二进制模式的特征
问题描述
对不起,我正在做我的期末论文,我应该在 ios 应用程序中进行图像提取,我只能在 imageview 中显示图像,我不知道如何使图像提取具有本地二进制模式,如果你能帮助我,我会感谢你并感谢它。感谢您的关注,希望您能帮助我
我试图显示图像并安装 openCV
import UIKit
class ViewController: UIViewController, UINavigationControllerDelegate, UIImagePickerControllerDelegate {
@IBOutlet weak var openCVVersionLabel: UILabel!
@IBOutlet weak var myimageview: UIImageView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
//Invoke functions in OpenCVWrapper class from swift
//openCVVersionLabel.text = OpenCVWrapper.openCVVersionString()
}
@IBAction func chooseimage(_ sender: Any)
{
let image = UIImagePickerController()
image.delegate = self
image.sourceType = UIImagePickerController.SourceType.photoLibrary
image.allowsEditing = true
self.present(image, animated: true)
{
//After it is complete
}
}
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any])
{
if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage
{
myimageview.image = image
}
else
{
//Error message
}
self.dismiss(animated: true, completion: nil)
}
}
我需要方法本地二进制模式中的 imageview 提取特征中的图像
解决方案
推荐阅读
- regex - 正则表达式在点|分号空格处拆分,但例如忽略 url
- python - 处理python字典中缺少的键
- c - 为什么可以在不检查返回值的情况下调用返回值的函数?
- tensorflow - 训练后使用 TensorFlow 模型进行目标检测
- javascript - 更改静态文件夹 - express
- go - 如何在非本地包错误中本地导入
- linux - 在 Linux 日志文件中记录最后 30 分钟的条目
- ansible - 使用 Ansible 在 fstab 中进行双重输入
- javascript - vue.js 将 getter 和 setter 添加到后期绑定属性
- java - 使用自定义适配器 sql 在我的列表视图上没有数据