code: boolean extractVersionInfo(QrCode qr) {
  		int version = estimateVersionBySize(qr);
  
  		// For version 7 and beyond use the version which has been encoded into the qr code
  		if( version >= QrCode.VERSION_ENCODED_AT) {
  			readVersionRegion0(qr);
  			int version0 = decodeVersion();
  			readVersionRegion1(qr);
  			int version1 = decodeVersion();
  
  			if (version0 < 1 && version1 < 1) { // both decodings failed
  				version = -1;
  			} else if (version0 < 1) { // one failed so use the good one
  				version = version1;
  			} else if (version1 < 1) {
  				version = version0;
  			} else if( version0 != version1 ){
  				version = -1;
  			} else {
  				version = version0;
  			}
  		} else if( version <= 0 ) {
  			version = -1;
  		}
  
  		qr.version = version;
  		return version >= 1 && version <= QrCode.MAX_VERSION;
  	}
docs: Determine the QR code's version. For QR codes version < 7 it can be determined using the marker's size alone.
  Otherwise the version is read from the image itself
  @return true if version was successfully extracted or false if it failed