Packing Pixel Data in OpenCV -


whenever read colored image 3 channels via cv::imread; data alignment bit awkward (neither byte nor integer) , slows me down when read single pixel data on gpu memory. , seems cv::mat class's logic behind alignment bit different had thought. not add byte between 2 pixels in single row in order have each pixel in row started @ every 4 bytes; rather pads bytes @ end of each row row may start @ every 4 bytes boundary.

what should pack each pixel data single unsigned integer? there built-in method in opencv not have use logical or operation packing each pixel data 1 one?

kind regards.

you can convert pixel format bgr bgra

see this example.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -