code: private float displayDensityAdjusted() {
  		open.mLock.lock();
  		try {
  			if (open.mCameraSize == null)
  				return displayMetrics.density;
  
  			int rotation = getWindowManager().getDefaultDisplay().getRotation();
  			int screenWidth = (rotation == 0 || rotation == 2) ? displayMetrics.widthPixels : displayMetrics.heightPixels;
  			int cameraWidth = open.mSensorOrientation == 0 || open.mSensorOrientation == 180 ?
  					open.mCameraSize.getWidth() : open.mCameraSize.getHeight();
  
  			return displayMetrics.density * cameraWidth / screenWidth;
  		} finally {
  			open.mLock.unlock();
  		}
  	}
docs: Some times the size of a font of stroke needs to be specified in the input image
  but then gets scaled to image resolution. This compensates for that.