に変換しています。こんにちは、イメージ内のテキストを認識するためのVBプログラムに基づくC#プログラムを作成しています。しかし、私はこの行のC#の同等を把握することができるように見えることはできません。VBプログラムの特定の行をC#
listOfContoursWithData.Sort(Function(oneContourWithData, otherContourWithData) oneContourWithData.boundingRect.X.CompareTo(otherContourWithData.boundingRect.X))
これはlistOfContoursWithDataはのインスタンスであるContourWithDataクラスです:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Emgu.CV.Util;
namespace TrainAndTest
{
public class ContourWithData
{
const int MIN_CONTOUR_AREA = 100;
public VectorOfPoint contour; // contour
public System.Drawing.Rectangle boundingRect; // bounding rect for contour
public double dblArea; // area of contour
public bool checkIfContourIsValid(){
if ((dblArea < MIN_CONTOUR_AREA))
return false;
else
return true;
}
}
'listOfContoursWithData'は' List 'ですか? –