我正在寻找使用private void dg_Sorting(object sender, DataGridSortingEventArgs e)
{
var sourceCollection = dg.ItemsSource as List<Item>;
if (sourceCollection != null)
{
var sortDirection = e.Column.SortDirection;
switch (sortDirection)
{
default:
case ListSortDirection.Descending:
sortDirection = ListSortDirection.Ascending;
break;
case ListSortDirection.Ascending:
sortDirection = ListSortDirection.Descending;
break;
}
int direction = (sortDirection == ListSortDirection.Ascending ? 1 : -1);
string property = e.Column.SortMemberPath;
switch (property)
{
case nameof(Item.X):
sourceCollection.Sort((x, y) => x.X.CompareTo(y.X) * direction);
break;
//...and so on for all properties/columns
}
}
}
包含python
的图像进行瞳孔检测。在我的测试图像中,我能够检测到(a)部分的瞳孔但是每当存在反射/眩光时,我都无法在(b)图像的一部分中准确地检测到opencv
瞳孔像素。有人可以帮帮我吗?这是我正在尝试的代码。
blob