Rect intersect - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Rect intersect method.

This code example shows how to use the following methods:height, intersect, isEmpty, width
	 *@return ��Map<String, Object>��������ʽ����ʶ��������Ϣ��Ŀǰ����Map<String, Object>����ֻ����һ��key:tags��tags����Ӧ�ĵĶ����� 
	 *        һ��List<String>����������List<String>�����ĵ�һ��Ԫ�ؾ��ǿ�������AngelEyesӦ�ù���ƽ̨��Ϊ����ͼƬ���õı�ǩ��ע��:ʶ���ɹ���������ʶ��׼ȷ�� 
	 *@throws AngelEyesException ʶ������ʧ��ʱ���׳������쳣 
	 */ 
	public Map<String, Object> identifyImage(Bitmap image, Rect roi, float r, float rr, int maxDrift, int kpCount, float scale) throws AngelEyesException{
		Rect roiImageRect = new Rect(roi);
		roiImageRect.intersect(0, 0, image.getWidth(), image.getHeight());
		 
		if(roiImageRect.isEmpty()){
			throw new AngelEyesException("roi is invalid, there are not intersection between roi and image"); 
		} 
		 
		Bitmap roiImage = Bitmap.createBitmap(image, roiImageRect.left, roiImageRect.top, roiImageRect.width(), roiImageRect.height());
		 
		return identifyImage(roiImage, r, rr, maxDrift, kpCount, scale);
	} 
	 
	private Map<String, Object> identifyImage(Bitmap image, float r, float rr, int maxDrift, int kpCount, float scale) throws AngelEyesException{
		checkAppKeyAndAppSecret(); 
		 
6
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Rect intersect Questions & Answers:

intersect Method Overview
If the specified rectangle intersects this rectangle, return true and set this rectangle to that intersection, otherwise return false and do not change this rectangle.
See Code Examples for other Android Rect Methods: