I have visual studio 2017 and unity 2018. I'm trying to work with a script of a neural network to be attached to an object in the scene that, in order to be trained, makes use of the bitmap class. The problem is that the console of unity gives me the error: 'The type or namespace 'Bitmap' could not be found'. Does anyone know how I can do ? I'm making use of the directives :
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
Here is the script:
public void Train()
{
//Convert to Pixel Array
Bitmap img = new Bitmap(@"C:\Users\Marc\Desktop\media\resoureces\sites.jpeg");
double[,,] pixelvalues = new double[3, img.Width, img.Height];
for (int i = 0; i < img.Width; i++)
{
for (int j = 0; j < img.Height; j++)
{
Color pixel = img.GetPixel(i, j);
pixelvalues[0, i, j] = pixel.R;
pixelvalues[1, i, j] = pixel.G;
pixelvalues[2, i, j] = pixel.B;
//if (pixel == *somecondition *)
//{
// **Store pixel here in a array or list or whatever**
//}
}
}