@Override
	public List<Marker> setMarkerOrinetation(List<Marker> markers, BufferedImage image) {
		List<Marker> result = new ArrayList<Marker>();
		Graphics2D g = null;
		if(debug){
			g = (Graphics2D) image.getGraphics();
			g.setColor(Color.GREEN);
		}
		for(int i = markers.size()-1; i >= 0; i--){
			Marker m = markers.get(i);
			Vector2d center = m.getCorner1().add(m.getCorner3()).add(m.getCorner2()).add(m.getCorner4());
			center.divide(4);
			Vector2d[] cornerArray = new Vector2d[]{m.getCorner1(), m.getCorner2(), m.getCorner3(), m.getCorner4()};
			Vector2d[] debugPoints = null;
			if(debug)
				debugPoints = new Vector2d[cornerArray.length];
			double[] blackness = getCornerBlackness(cornerArray, center, image, debugPoints);
			if(debug){
				sortByBlackness(debugPoints, blackness);
				Vector2d p = debugPoints[0];
				g.fillOval((int) p.getX()-2,(int) p.getY()-2, 4, 4);
			}
			blackness = sortByBlackness(cornerArray, blackness);
			if(meetsConditions(blackness)){
				m.setCorner3(cornerArray[0]);
				m.setCorner1(cornerArray[1]);
				m.setCorner2(cornerArray[2]);
				m.setCorner4(cornerArray[3]);
				setOtherCornersBasedOnThrid(m, center);
				result.add(m);
			}
		}
		return result;
	}