public unsafe Bitmap MedianFilter(Bitmap Img)
{
int Size =2;
List<byte> R = new List<byte>();
List<byte> G = new List<byte>();
List<byte> B = new List<byte>();
int ApetureMin = -(Size / 2);
int ApetureMax = (Size / 2);
BitmapData imageData = Img.LockBits(new Rectangle(0, 0, Img.Width, Img.Height), ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb);
byte* start = (byte*)imageData.Scan0.ToPointer ();
for (int x = 0; x < imageData.Width; x++)
{
for (int y = 0; y < imageData.Height; y++)
{
for (int x1 = ApetureMin; x1 < ApetureMax; x1++) …Run Code Online (Sandbox Code Playgroud) 我想在列表中得到tupples的总和.举个例子
[("Isuru1","Ranasinghe1",123),("Isuru2","Ranasinghe2",123),("Isuru3","Ranasinghe3",123),("Isuru4","Ranasinghe4",123)]
Run Code Online (Sandbox Code Playgroud)
在上面的列表中答案必须是4.请帮我解决这个问题.我是哈斯克尔新手:(
我有一个整数数组,如{1,2,3,4,5,0,0,0,0,0,2,3,4,5,7,8,0,0,0,0,0,1 }
我想检查数组的第5个元素到第9个元素是否都是0.
以下代码我试过......
if (Enumerable.Range(vHisto[i],vHisto[ i + 30]).Contains(0))
{
x = i+30;
break;
}
Run Code Online (Sandbox Code Playgroud)
vHisto是一个包含一些整数的列表,例如.