opencv_contrib
opencv_contrib copied to clipboard
Is it possible to get the coordinates of color checkers detected by the mcc module?
System information (version)
- OpenCV => 4.4.5
- Operating System / Platform => Windows 64 Bit
- Compiler => PyCharm
Detailed description
Steps to reproduce
Issue submission checklist
- [ ] I report the issue, it's not a question
- [x] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [ ] I updated to the latest OpenCV version and the issue is still there
- [ ] There is reproducer code and related data files: videos, images, onnx, etc
Hi, I'm currently working on a color checker detection project and I've built & run this git repo to detect color checkers in images. my code:
im_path = r"my_path"
im = cv2.imread(im_path)
detector = cv2.mcc_CCheckerDetector()
cchecker_detector = detector.create()
val = cchecker_detector.process(im, 0, nc=24)
if(val):
vec = cchecker_detector.getListColorChecker()
rbg = vec.getChartsRGB()
I know the format of variable rbg and I could retrieve RGB information of each color chart from it. But now I need to find the coordinates of these color charts (i.e, the x and y value of each color box) Are there any possible solutions or methods in opencv to handle this? Thank you much in advance!
you can use vec.getBox() to aquire the coordinates of the entire color card