Skip to content

weird big size of Mat (rows/cols) after converting from UIImage #9

@anonym24

Description

@anonym24
import UIKit
import SwiftEyes

class ViewController: UIViewController {

    @IBOutlet weak var imgView: UIImageView!
    override func viewDidLoad() {
        super.viewDidLoad()
        let image = UIImage(named: "img2")
        imgView.image = image
        print("Size of UIImage: \(image!.size.height) \(image!.size.width)")
        
        let mat = OCVMat(image: image!)
        print("Size of Mat: \(mat.rows) \(mat.cols)")
    }
}

Output:

Size of UIImage: 128.0 128.0
Size of Mat: 490496 24576

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