Created
January 22, 2013 10:53
-
-
Save walidvb/4593774 to your computer and use it in GitHub Desktop.
transform Mat into Channel32f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//cv::imshow("", img.pixels); | |
Channel32f chan(img.width, img.height); | |
for(int i = 0; i < img.pixels.rows; i++) | |
{ | |
for (int j = 0; j<img.pixels.cols; j++) | |
{ | |
chan.setValue(ci::Vec2i(i, j), img.pixelAt(i, j)); | |
} | |
} | |
Texture myImg; | |
myImg = Texture(chan); | |
draw(myImg); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment