We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is the C++ equivalent to separate a R/G/B channel.
Mat src = imread("img.png",CV_LOAD_IMAGE_COLOR); //load image Mat bgr[3]; //destination array split(src,bgr);//split source //Note: OpenCV uses BGR color order imwrite("blue.png",bgr[0]); //blue channel imwrite("green.png",bgr[1]); //green channel imwrite("red.png",bgr[2]); //red channel
How to achieve this in Go OpenCV?
The text was updated successfully, but these errors were encountered:
Hope help
for x := 0; x < img.Width(); x++ { for y := 0; y < img.Height(); y++ { channels := img.Get2D(x, y).Val() fmt.Printf("B:%d, G:%d, R:%d, A:%d \n", uint8(channels[0]), uint8(channels[1]), uint8(channels[2]), uint8(channels[3])) } }
Sorry, something went wrong.
No branches or pull requests
Here is the C++ equivalent to separate a R/G/B channel.
How to achieve this in Go OpenCV?
The text was updated successfully, but these errors were encountered: