public function readSpecificRegion($symbology, $rectX, $rectY, $rectWidth, $rectHeight)
    {
        if ($symbology == '')
            throw new Exception('Symbology not specified');

        if ($rectX == '')
            throw new Exception('X position not specified');

        if ($rectY == '')
            throw new Exception('Y position not specified');

        if ($rectWidth == '')
            throw new Exception('Width not specified');

        if ($rectHeight == '')
            throw new Exception('Height not specified');

        //build URI to read barcode
        $strURI = Product::$baseProductUri . '/barcode/' . $this->getFileName() . '/recognize?type=' . $symbology . '&rectX=' . $rectX . '&rectY=' . $rectY
            . '&rectWidth=' . $rectWidth . '&rectHeight=' . $rectHeight;

        //sign URI
        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');

        $json = json_decode($responseStream);

        if ($json->Code == 200)
            return $json->Barcodes;
        else
            return false;
    }
public function readSpecificRegion($symbology, $rectX, $rectY, $rectWidth, $rectHeight)
    {
        if ($symbology == '')
            throw new Exception('Symbology not specified');

        if ($rectX == '')
            throw new Exception('X position not specified');

        if ($rectY == '')
            throw new Exception('Y position not specified');

        if ($rectWidth == '')
            throw new Exception('Width not specified');

        if ($rectHeight == '')
            throw new Exception('Height not specified');

        //build URI to read barcode
        $strURI = Product::$baseProductUri . '/barcode/' . $this->getFileName() . '/recognize?type=' . $symbology . '&rectX=' . $rectX . '&rectY=' . $rectY
            . '&rectWidth=' . $rectWidth . '&rectHeight=' . $rectHeight;

        //sign URI
        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');

        $json = json_decode($responseStream);

        if ($json->Code == 200)
            return $json->Barcodes;
        else
            return false;
    }
public function readSpecificRegion ( $ symbology , $ rectX , $ rectY , $ rectWidth , $ rectHeight ) { if ( $ symbology == '' ) throw new Exception ( 'Symbology not specified' ) ; if ( $ rectX == '' ) throw new Exception ( 'X position not specified' ) ; if ( $ rectY == '' ) throw new Exception ( 'Y position not specified' ) ; if ( $ rectWidth == '' ) throw new Exception ( 'Width not specified' ) ; if ( $ rectHeight == '' ) throw new Exception ( 'Height not specified' ) ; //build URI to read barcode $ strURI = Product :: $ baseProductUri . '/barcode/' . $ this -> getFileName ( ) . '/recognize?type=' . $ symbology . '&rectX=' . $ rectX . '&rectY=' . $ rectY . '&rectWidth=' . $ rectWidth . '&rectHeight=' . $ rectHeight ; //sign URI $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) return $ json -> Barcodes ; else return false ; }
Read Barcode from Specific Region of Image

@param string $symbology string of barcode.
@param string $rectX
@param string $rectY
@param string $rectWidth
@param string $rectHeight

@return array
@throws Exception
Read Barcode from Specific Region of Image