Skip to content

Scan Business Card

Sends a Business Card image to the Business Card Analyzer and returns the extracted business card information.

The method accepts the following parameters:

  • response_, out parameter of type CLOB, to which the response will be written.
  • image_data_, required parameter of type BLOB to pass the binary image data to the Business Card Analyzer.
  • configuration_id_, optional parameter to specify the Configuration ID from Scheduling Optimization and Machine Learning Configuration to use. If not specified the 'DEFAULT' configuration will be used.
  • response_format_, optional parameter to specify the response format. Possible values are 'XML', 'JSON' and 'IFS_MESSAGE'. If not specified 'IFS_MESSAGE' will be used as the default format.
BEGIN  
   Ml_Util_API.Scan_Business_Card(
      response_         => :response_,   -- Clob parameter to accept response data.
      image_data_       => :image_data_, -- Blob parameter to pass the binary image data.
      configuration_id_ => 'DEFAULT',    -- Configuration ID to use.
      response_format_  => 'XML');       -- Response format ('XML' / 'JSON' / 'IFS_MESSAGE').
END;

For the above call, the response may look as following. The response may vary depending on the IFS Planning & Scheduling Optimization (PSO) version being used.

<BusinessCardScanResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RESTfulGateway.ResponseObjects">
  <InferenceId>8ae9eea418094916a9112e6f3ceb08bd</InferenceId>
  <Result>
    <BusinessCardResult>
      <Id>city</Id>
      <Index>0</Index>
      <Value>Melbourne</Value>
    </BusinessCardResult>
    <BusinessCardResult>
      <Id>country</Id>
      <Index>1</Index>
      <Value>Australia</Value>
    </BusinessCardResult>
    <BusinessCardResult>
      <Id>emails</Id>
      <Index>2</Index>
      <Value>bon.scott@adcurrent.com</Value>
    </BusinessCardResult>
    <BusinessCardResult>
      <Id>office_phone_numbers</Id>
      <Index>3</Index>
      <Value>+620300999666</Value>
    </BusinessCardResult>
    <BusinessCardResult>
      <Id>state</Id>
      <Index>4</Index>
      <Value>Victoria</Value>
    </BusinessCardResult>
    <BusinessCardResult>
      <Id>websites</Id>
      <Index>5</Index>
      <Value>adcurrent.com</Value>
    </BusinessCardResult>
  </Result>
</BusinessCardScanResponse>

Tip: The IFS Message response format ('IFS_MESSAGE') allows using existing methods in Message_SYS package to handle the response which may be simpler to use in the PL/SQL code than 'XML' or 'JSON'.

For more details about the Business Card Analyzer please see the PSO Machine Learning Guide and the PSO Interface Guide.