Exemple #1
0
        public Cellls2dViewer(Cells2D <HTMCell> inputs)
        {
            InitializeComponent();
            _inputs           = inputs;
            pictureBox.Width  = cellWidth * _inputs.Width;
            pictureBox.Height = cellHeight * _inputs.Height;
            Graphics g = pictureBox.CreateGraphics();

            g.Clear(Color.Gray);
        }
Exemple #2
0
        public bool Initialize()
        {
            _currentImage  = null;
            _previousImage = null;
            _outputWidth   = int.Parse(outputSizeComboBox.Text.Substring(0, 3));
            _outputHeight  = int.Parse(outputSizeComboBox.Text.Substring(6, 3));
            _blankImage    = new Image <Gray, byte>(_outputWidth, _outputHeight);
            _outputCells   = new Cells2D <HTMCell>(_outputWidth, _outputHeight);

            //
            outputSizeComboBox.Enabled   = false;
            detectMotionCheckBox.Enabled = true;
            return(true);
        }
Exemple #3
0
        public Cells2D <T> Clone()
        {
            Cells2D <T> newCells = new Cells2D <T>();

            newCells._cells = new T[Width, Height];
            for (int x = 0; x < Width; x++)
            {
                for (int y = 0; y < Height; y++)
                {
                    newCells._cells[x, y] = new T();
                    newCells._cells[x, y].SetActive(_cells[x, y].GetActive(0));
                }
            }
            return(newCells);
        }
Exemple #4
0
 public FilterVertex(Cells2D <T> inputs)
     : base(inputs.Width, inputs.Height)  // to change. the width and height of this structure is a function of inputs.width and inputs.height
 {
     _inputs = inputs;
 }