Skip to content

Instantly share code, notes, and snippets.

View SMR-83's full-sized avatar
๐Ÿš€

SMR-83 SMR-83

๐Ÿš€
View GitHub Profile
@SMR-83
SMR-83 / MobileDensitometry.cs
Created January 8, 2020 06:13
Mobile Densitometry code using OpenCV and Unity
case ImageProcessingType.MobileDensitometry:
bool isFullSet;
//Convert from color to grayscale
Imgproc.cvtColor(frameMatrix, grayMatrix, Imgproc.COLOR_RGBA2GRAY);
//Make a Rect to define ROI
OpenCVForUnity.CoreModule.Rect guideBox = new OpenCVForUnity.CoreModule.Rect(new Point(grayMatrix.cols() / 2 - 125, grayMatrix.rows() / 2 + 10), new Point(grayMatrix.cols() / 2 + 125, grayMatrix.rows() / 2 + 260));