Skip to content

IplImage row alignment #1

Open
Open
@jtbates

Description

@jtbates

The libopencv routines assume that IplImage data is contiguous, but the rows are padded to be 4 or 8 byte aligned (although I've only observed 4 byte alignment).

http://opencv.willowgarage.com/documentation/c/core_basic_structures.html#align

As an example, this works:

t7> require 'opencv'
t7> require 'image'
t7> imgL=opencv.imgL()
t7> imgR=opencv.imgR()
t7> sc=opencv.StereoCorrespondenceGC(imgL,imgR)
t7> image.display(sc)

But this does not:

t7> sc_m1=opencv.StereoCorrespondenceGC(imgL[{{},{},{1,639}}],imgR[{{},{},{1,639}}])
t7> image.display(sc_m1)

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