-
Generated image vs Processed image
08/17/2015 at 07:16 • 0 commentsOn the left is the generated image, on the right the processed image. Everything looks ok! So there must be something wrong inside the edges processing algorithm.
-
Successful image detection on Raspberian + Mono
08/17/2015 at 06:16 • 0 commentsHere is the corresponding repository containing everything to make this project work:
https://github.com/strofos/grigore/tree/master/SOFTWARE - Board/Test02 - Detection using AForge Mono
After downloading it, we must compile it. Just navigate to the folder "Test02 - Detection using AForge Mono" and run the "xbuild" command:
root@raspberrypi:/grigore/Test02 - Detection using AForge Mono# xbuild
It will start compiling the hole solution, project by project:
and notify you when it completes:Unfortunately I am not that familiar with Linux so I didn't set the lines to move the generated libraries.
So we have to manually move "AForge.dll", "AForge.xml", "AForge.Imaging.dll", "AForge.Imaging.xml", "AForge.Math.dll", "AForge.Math.xml" to the "GrigoreDetectionConsole\bin\Debug" folder.
Each library can be found in its project folder, inside [Project]\bin\Debug
Now we can run this test:
root@raspberrypi:/grigore/Test02 - Detection using AForge Mono/GrigoreDetectionConsole/bin/Debug# mono GrigoreDetectionConsole.exe
and will get a response like this:As you can see the code runs, but the detected position is not quite what it should be. I will output the difference image and edges to debug it.
I also added a Windows project that does this in real time but unfortunately I can not run the X Server in remote, so I can't use it for the moment.
The detection duration is half a second, which is great for this project.
This was still a success, so soon I'll be starting to write the main code.
-
Raspberian, PiCam and Mono instalation
08/14/2015 at 05:50 • 0 commentsInstall Raspberian
First boot: resize to max size of SD card. Enable camera support
Login: pi/raspberry
Change super pass to "pi"
sudo passwd
# introduce new passwordEnable camera in RPi configuration
Enable camera in condif
raspi-config
Enable camera ..
Check camera configuration
Login as super and take a snapshot: http://www.raspberrypi.org/documentation/usage/camera/raspicam/raspistill.md
DATE=$(date +"%Y-%m-%d_%H%M")
raspistill -vf -hf -o /home/pi/camera/$DATE.jpgInstall mono
apt-get update
apt-get install mono-runtime
apt-get install mono-complete
Check if is Mono was installed correctly
Create a file named "HelloWorld.cs" and write the following code inside#####
using System;
public class HelloWorld
{
public static void Main()
{
Console.WriteLine("Hello World!");
}
}
#####
Compile and run it
gmcs HelloWorld.cs
mono HelloWorld.exe -
Detection test failed in Windows 10 IoT due to missing System.Drawing
08/06/2015 at 06:06 • 0 commentsUnfortunately Windows 10 IoT is lacking the namespace System.Drawing so any code that uses Image or Bitmap objects will not compile. I was looking forward to have the project on Windows but, as Mono has this functionality, the next step is to reinstall Raspberrian + Mono and give it a try there. I also have to recompile the AForge code over Mono.
-
First detection tests, powered by AForge
07/23/2015 at 08:26 • 0 commentsI love the AForge framework from Andrew Kirillov so it made sense to use it because Microsoft just released the Raspberry Pi support in Visual Studio C#.
Right now I am still in doubt weather I will use Mono or .Net but is clear to me that I will use C# instead of Python. I can use some advices and feedback on this matter.
The code just makes a difference filter between an original empty board image:
and an image containing the robot (made using GIMP):
and returns an image containing the resulted edges:
https://github.com/strofos/grigore/tree/master/SOFTWARE - Board/Test01 - Detection using AForge
-
First step
07/01/2015 at 07:52 • 0 commentsFirst I mounted an Arduino on the Magician chassis and a breadboard. On the breadboard I added the L298 driver and wrote some code to drive the robot over the serial.
Next use RPi to control the Arduino to some desired position by tracking Grigore's position.