private void takeImages()
	{
		while(true)
		{
			Runtime rt = Runtime.getRuntime();
			Process p;
			InputStream is;
			is = null;
			long streamLength = 0;
			int offset = 0;
			int numRead = 0;
			try
			{
				while(true)
				{
					p = rt.exec("raspistill -n --nopreview -t 250 -w 500 -h 350 -q 5 -e jpg -o -");
					is = p.getInputStream();

					streamLength = is.available();
					currentImage = new byte[(int) streamLength];

					offset = 0;
					numRead = 0;

					while(offset<currentImage.length && (numRead == is.read(currentImage,offset,currentImage.length-offset)))
						offset += numRead;
					is.close();
				}
				
			}
			catch (Exception e)
			{}
		}
	}