public override ICData Run() { List<Point> sourcePoints = Utilities.ExtractPoints(m_Image1, TresholdColor); List<Point> targetPoints = Utilities.ExtractPoints(m_Image2, TresholdColor); m_sourceMatrix = Utilities.ListToMatrix(sourcePoints); m_targetMatrix = Utilities.ListToMatrix(targetPoints); m_commonSize = new Size(Math.Max(m_Image1.Width, m_Image2.Width), Math.Max(m_Image1.Height, m_Image2.Height)); PCAMatching matching = new PCAMatching(new DoubleMatrix((Matrix<double>)m_sourceMatrix.Clone()), m_targetMatrix); matching.Calculate(); CPCAresultData retResult = new CPCAresultData(m_sourceMatrix, matching.Result, m_commonSize, matching); retResult.IncludeSource = IncludeSource; return retResult; }
public override ICData Run() { List <Point> sourcePoints = Utilities.ExtractPoints(m_Image1, TresholdColor); List <Point> targetPoints = Utilities.ExtractPoints(m_Image2, TresholdColor); m_sourceMatrix = Utilities.ListToMatrix(sourcePoints); m_targetMatrix = Utilities.ListToMatrix(targetPoints); m_commonSize = new Size(Math.Max(m_Image1.Width, m_Image2.Width), Math.Max(m_Image1.Height, m_Image2.Height)); PCAMatching matching = new PCAMatching(new DoubleMatrix((Matrix <double>)m_sourceMatrix.Clone()), m_targetMatrix); matching.Calculate(); CPCAresultData retResult = new CPCAresultData(m_sourceMatrix, matching.Result, m_commonSize, matching); retResult.IncludeSource = IncludeSource; return(retResult); }