Compare commits
No commits in common. "3eae86cc700c40863e32be2ed39676c7a42dde67" and "31bc12373be762657b66f1a5853b1f7f0fc1cabe" have entirely different histories.
3eae86cc70
...
31bc12373b
|
|
@ -64,9 +64,10 @@ namespace Marking.OCR.Service.Helper
|
|||
|
||||
public void Show(Mat mat, string title = "")
|
||||
{
|
||||
#if !DEBUG
|
||||
if (!App.HostEnvironment.IsDevelopment())
|
||||
{
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
Cv2.ImShow(string.IsNullOrWhiteSpace(title) ? DateTime.UtcNow.ToString() : title, mat);
|
||||
Cv2.WaitKey(0);
|
||||
|
|
@ -145,7 +146,7 @@ namespace Marking.OCR.Service.Helper
|
|||
{
|
||||
//转换颜色空间
|
||||
Mat mat_color = new Mat();
|
||||
Cv2.CvtColor(mat, mat_color, ColorConversionCodes.GRAY2BGR);
|
||||
Cv2.CvtColor(mat, mat_color,ColorConversionCodes.GRAY2BGR);
|
||||
|
||||
Cv2.DrawContours(mat_color, new Point[][] { contour }, -1, Scalar.Red, 2);
|
||||
return mat_color;
|
||||
|
|
|
|||
Loading…
Reference in New Issue