private static void ProcessMiddleRows(RawBGGRMap <ushort> file, VectorMap res)
        {
            // Middle Rows
            Parallel.For(0, (res.Height - 2) / 2, yy =>
            {
                var y = yy * 2 + 1;
                ProcessMiddleOddRows(file.GetRow(y), res.Width, res.GetRow(y));

                y++;

                ProcessMiddleEvenRows(file.GetRow(y), res.Width, res.GetRow(y));
            });
        }
Exemple #2
0
 private static void ApplySingleFilterInplace(VectorMap map, VectorToVectorFilter filter)
 {
     Parallel.For(0, map.Height, y =>
     {
         var pix = map.GetRow(y);
         for (var x = 0; x < map.Width; x++)
         {
             filter.ProcessColor(pix, pix);
             pix.MoveNext();
         }
     });
 }
Exemple #3
0
        private static VectorMap ApplyCurve(ColorMapUshort map, Vector3[] curve)
        {
            var result = new VectorMap(map.Width, map.Height);

            Parallel.For(0, result.Height, y =>
            {
                var input  = map.GetRow(y);
                var output = result.GetRow(y);
                for (var x = 0; x < result.Width; x++)
                {
                    output.SetAndMoveNext(curve[input.R].X, curve[input.G].Y, curve[input.B].Z);
                    input.MoveNext();
                }
            });
            return(result);
        }
Exemple #4
0
        private static RGB8Map ConvertToRGB(VectorMap map, VectorToColorFilter <byte> filter)
        {
            var result = new RGB8Map(map.Width, map.Height);

            Parallel.For(0, map.Height, y =>
            {
                var input  = map.GetRow(y);
                var output = result.GetRow(y);
                for (var x = 0; x < map.Width; x++)
                {
                    filter.ProcessColor(input, output);
                    input.MoveNext();
                    output.MoveNext();
                }
            });
            return(result);
        }