public bool Matches(ObsTransform obj) { if (obj == null) { return(false); } return(Flipped == obj.Flipped && Camera == obj.Camera && Rotation == obj.Rotation && Scale == obj.Scale && Opacity == obj.Opacity && Origin == obj.Origin); }
public static ObsTransform GetVisualProcessingResults(string fileName) { ObsTransform results = new ObsTransform(); IntermediateResults intermediateResults = new IntermediateResults(); using (DirectBitmap bitmap = DirectBitmap.FromFile(fileName)) { int line = 0; int bitmapWidth = bitmap.Width; int bitmapHeight = bitmap.Height; int xOffset = bitmapWidth > 1920 ? -(bitmapWidth - 1920) / 2 : 0; int yOffset = bitmapHeight > 1080 ? -(bitmapHeight - 1080) / 2 : 0; while (line < bitmapHeight) { ProcessLine(bitmap, line, intermediateResults, xOffset, yOffset); line++; } //intermediateResults.FindCircleCenters(bitmap); } results.Calculate(intermediateResults); return(results); }