Skip to content

Doesn't work - OpenCV Error: Insufficient memory, Error: Assertion failed #8

@anonym24

Description

@anonym24

import UIKit
import SwiftEyes

class ViewController: UIViewController {

    @IBOutlet weak var imgView: UIImageView!
    override func viewDidLoad() {
        super.viewDidLoad()
        let image = UIImage(named: "img")
        imgView.image = image
        let mat = OCVMat(image: image!)
        let currentMat = mat.clone() // just for test 
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

PhotoLibraryServices (0x1127c1880). One of the two will be used. Which one is undefined.
teset2(2844,0x10c4b0000) malloc: *** mach_vm_map(size=194431329378304) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
OpenCV Error: Insufficient memory (Failed to allocate 194431329376256 bytes) in OutOfMemoryError, file /Users/admin/Library/Caches/CocoaPods/Pods/Release/OpenCV-Dynamic/3.2.4-8d4c9/opencv/modules/core/src/alloc.cpp, line 52
OpenCV Error: Assertion failed (u != 0) in create, file /Users/admin/Library/Caches/CocoaPods/Pods/Release/OpenCV-Dynamic/3.2.4-8d4c9/opencv/modules/core/src/matrix.cpp, line 433
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /Users/admin/Library/Caches/CocoaPods/Pods/Release/OpenCV-Dynamic/3.2.4-8d4c9/opencv/modules/core/src/matrix.cpp:433: error: (-215) u != 0 in function create

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions