Face Compare report Changes 3 : ps

This commit is contained in:
VE10-Sanjeev 2022-09-16 21:42:43 +05:30
parent 12f73bceb1
commit 09bbb166ce
16 changed files with 715 additions and 173 deletions

View File

@ -10574,7 +10574,7 @@ class PD_Controller extends REST_Controller
$response = faceapi::toMakeFaceBoundingBox($bounding_box, $destination_path, $file_name, $img_result[$i]['image_key']);
array_push($img_response, $response);
if (($img_result[$i]['image_key'] == 'selfie_with_person_met')) {
$this->uploadPicInS3($pdid, $destination_path, $bucketname, $extension);
$this->uploadPicInS3($pdid, $destination_path, $bucketname,$apcntid);
}
// faceapi::toMakeFaceBoundingBox($bounding_box,$destination_path,$file_name);
@ -10588,8 +10588,8 @@ class PD_Controller extends REST_Controller
// }
}
$update_where = array('pd_id', $pdid,'pd_co_applicant_id'=>$apcntid);
$this->PD_Model->updateRecords(['facecompare_result' => json_encode($img_response)], PDAPPLICANTSDETAILS, $update_where);
$update_where = array('fk_pd_id'=>$pdid,'pd_co_applicant_id'=>$apcntid);
$this->PD_Model->updateRecords(['facecrop' => json_encode($img_response)], PDAPPLICANTSDETAILS, $update_where);
log_message('ERROR', "In PD Controller to Make FaceBoundingBox Done");
// $data['dataStatus'] = true;
// $data['status'] = REST_Controller::HTTP_OK;
@ -10621,8 +10621,8 @@ class PD_Controller extends REST_Controller
// $this->response($data, REST_Controller::HTTP_OK);
}
public function uploadPicInS3($pdid,$destination_path,$bucketname,$extension){
$file = 'face_api_image'.$extension;
public function uploadPicInS3($pdid,$destination_path,$bucketname,$apcntid){
$file = "face_api_image.jpeg";
$key = 'pd' . $pdid . '/' . $file;
$sourcefile = $destination_path.$file;
@ -10636,9 +10636,9 @@ class PD_Controller extends REST_Controller
$this->db->WHERE('fk_pd_id', $pdid)
->WHERE('pd_document_title', 'face_api_result_image')->UPDATE(PDDOCUMENTS, array('isactive' => 0));
// then update
$this->db->WHERE('pd_id', $pdid)->UPDATE(PDTRIGGER, array('facemark_image_generated' => 1));
$this->db->WHERE('fk_pd_id', $pdid)->WHERE('pd_co_applicant_id', $apcntid)->UPDATE(PDAPPLICANTSDETAILS, array('facemark_image_generated' => 1));
log_message('ERROR', "In PD Controller to Make FaceBoundingBox save document table face_api_result_image after unlink");
$record_data = array('fk_pd_id' => $pdid, 'pd_document_title' => 'face_api_result_image', 'pd_document_name' => $file);
$record_data = array('fk_pd_id' => $pdid, 'pd_document_title' => 'face_api_result_image', 'pd_document_name' => $file ,'co_applicant_id'=>$apcntid,'image_key'=>'face_mark');
$this->PD_Model->saveRecords($record_data, PDDOCUMENTS);
unlink($destination_path.$file);
}

View File

@ -135,9 +135,7 @@ class Test extends REST_Controller {
// echo '***********************';
}
}
//update face api result in main table
//$where_condition_array = array('pd_id' => $pdid);// pdid coapplicant id get store in coapp
$where_condition_array = array('pd_id' => $pdid,'isactive' => 1,'pd_co_applicant_id' => $coapplicant);
$where_condition_array = array('fk_pd_id' => $pdid,'isactive' => 1,'pd_co_applicant_id' => $coapplicant);
$this->PD_Model->updateRecords(['faceapi_result' => json_encode($res_data)],PDAPPLICANTSDETAILS,$where_condition_array);
//delete local files if created

File diff suppressed because one or more lines are too long

View File

@ -6,6 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
<style type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
@ -468,7 +471,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding: 5px;
/*margin: 10px;*/
}
.facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; }
/* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;}
/* ######### TOOLTIP CSS END ######### */
@ -711,25 +717,62 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
$faceimage_url = '';
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
$faceimage_url = array();
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['is_face_api_enabled'] == 1)
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
$faceimage_url = $com_value['doc_url'];break;
}
}
// $faceimage_url = $com_value['doc_url'];break;
array_push($faceimage_url,$com_value['doc_url']);
}
}
}
if(!empty($faceimage_url)){
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo '</div>';
echo '<br>';
?>
<br>
<?php
if(!empty($facecrop)){
$ci = !empty($facecrop[0]['compare_image']) ? $facecrop[0]['compare_image'] :array() ;
$si = !empty($facecrop[1]['source_image']) ? $facecrop[1]['source_image'] : array();
// ########################### Percentage Bar Section #########################################
echo "<h3>Face Comparison</h3>" ;
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
for ($i = 0; $i < count($ci); $i++) {
$symbol = (round($ci[$i]["Similarity"]) > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
echo '<div class="facecrop_row facecrop">
<div class="facecrop_column">
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
</div>
<div class="facecrop_column">'.$symbol.'</div>
<div class="facecrop_column">
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
</div>
</div>';
echo '<p style="text-align:left;">Similarity
<span style="float:right;">'.round($ci[$i]["Similarity"]).'</span>
</p>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%">
'.round($ci[$i]["Similarity"]).'
</div>
</div>';
}
// ########################### End of Percentage Bar Section #########################################
}
?>
<p contenteditable="true"><b>Loan Applicants:</b></p>
<table class="scorecard_table">

View File

@ -6,6 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
<style type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
@ -474,7 +477,10 @@ font-weight: bolder;;
padding: 5px;
/*margin: 10px;*/
}
.facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; }
/* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;}
/* ######### TOOLTIP CSS END ######### */
@ -718,25 +724,62 @@ font-weight: bolder;;
}
$faceimage_url = '';
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
$faceimage_url = array();
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['is_face_api_enabled'] == 1)
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
$faceimage_url = $com_value['doc_url'];break;
}
}
// $faceimage_url = $com_value['doc_url'];break;
array_push($faceimage_url,$com_value['doc_url']);
}
}
}
if(!empty($faceimage_url)){
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo '</div>';
echo '<br>';
?>
<br>
<?php
if(!empty($facecrop)){
$ci = !empty($facecrop[0]['compare_image']) ? $facecrop[0]['compare_image'] :array() ;
$si = !empty($facecrop[1]['source_image']) ? $facecrop[1]['source_image'] : array();
// ########################### Percentage Bar Section #########################################
echo "<h3>Face Comparison</h3>" ;
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
for ($i = 0; $i < count($ci); $i++) {
$symbol = (round($ci[$i]["Similarity"]) > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
echo '<div class="facecrop_row facecrop">
<div class="facecrop_column">
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
</div>
<div class="facecrop_column">'.$symbol.'</div>
<div class="facecrop_column">
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
</div>
</div>';
echo '<p style="text-align:left;">Similarity
<span style="float:right;">'.round($ci[$i]["Similarity"]).'</span>
</p>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%">
'.round($ci[$i]["Similarity"]).'
</div>
</div>';
}
// ########################### End of Percentage Bar Section #########################################
}
?>
<p contenteditable="true"><b>Loan Applicants:</b></p>
<table class="scorecard_table">

View File

@ -6,6 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
<style type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
@ -468,7 +471,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding: 5px;
/*margin: 10px;*/
}
.facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; }
/* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;}
/* ######### TOOLTIP CSS END ######### */
@ -712,27 +718,64 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
$faceimage_url = '';
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
$faceimage_url = $com_value['doc_url'];break;
}
}
}
if(!empty($faceimage_url)){
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
}
$faceimage_url = array();
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['is_face_api_enabled'] == 1)
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
// $faceimage_url = $com_value['doc_url'];break;
array_push($faceimage_url,$com_value['doc_url']);
}
}
}
if(!empty($faceimage_url)){
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo '</div>';
echo '<br>';
?>
<br>
<?php
if(!empty($facecrop)){
$ci = !empty($facecrop[0]['compare_image']) ? $facecrop[0]['compare_image'] :array() ;
$si = !empty($facecrop[1]['source_image']) ? $facecrop[1]['source_image'] : array();
// ########################### Percentage Bar Section #########################################
echo "<h3>Face Comparison</h3>" ;
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
for ($i = 0; $i < count($ci); $i++) {
$symbol = (round($ci[$i]["Similarity"]) > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
echo '<div class="facecrop_row facecrop">
<div class="facecrop_column">
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
</div>
<div class="facecrop_column">'.$symbol.'</div>
<div class="facecrop_column">
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
</div>
</div>';
echo '<p style="text-align:left;">Similarity
<span style="float:right;">'.round($ci[$i]["Similarity"]).'</span>
</p>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%">
'.round($ci[$i]["Similarity"]).'
</div>
</div>';
}
// ########################### End of Percentage Bar Section #########################################
}
?>
<p contenteditable="true"><b>Loan Applicants:</b></p>
<table class="scorecard_table">

View File

@ -474,9 +474,17 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa
/*margin: 10px;*/
}
.facecrop {
height: 100px;
width: 600px;
}
box-sizing: border-box;
}
.facecrop_row {
display: flex;
}
/* Create three equal columns that sits next to each other */
.facecrop_column {
flex: 33.33%;
padding: 5px;
}
/* ######### TOOLTIP CSS END ######### */
@ -714,20 +722,35 @@ if ( isset($pdf) ) {
}
$faceimage_url = '';
// $faceimage_url = '';
$faceimage_url = array();
// $all_applicant_details
// for ($i = 0; $i < count($all_applicant_details); $i++) {
// if($all_applicant_details[$j]['facemark_image_generated'] == 1){
// $faceimage_url = $com_value['doc_url'];
// break;
// }
// }
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
// if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
// print_r($pd_images['common_images']);die();
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['is_face_api_enabled'] == 1)
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
$faceimage_url = $com_value['doc_url'];break;
// $faceimage_url = $com_value['doc_url'];break;
array_push($faceimage_url,$com_value['doc_url']);
}
}
}
// print_r($faceimage_url);die();
if(!empty($faceimage_url)){
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo '</div>';
echo '<br>';
@ -740,21 +763,40 @@ if ( isset($pdf) ) {
$si = !empty($facecrop[1]['source_image']) ? $facecrop[1]['source_image'] : array();
// ########################### Percentage Bar Section #########################################
echo "<h3>Face Comparison</h3>" ;
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;">≠</span>';
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;">=</span>';
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center></center></span>';
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
for ($i = 0; $i < count($ci); $i++) {
$symbol = (round($ci[$i]["Similarity"]) > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
echo '<div><div class="facecrop">';
echo '<img src="data:image/png;base64,'. $si["base64"].'" width="50" height="50" alt="'.$si["name"].'" align="left"/>';
echo $symbol;
// if(round($ci[$i]["Similarity"]) > 50){ echo '<center><h1>'.$equal_mark.'</h1></center>'; }else{ echo '<center><h1>'.$notequal_mark.'</h1></center>'; }
echo '<img src="data:image/png;base64,'. $ci[$i]["base64"].'" width="50" height="50" alt="'.$ci[$i]["name"].'" align="right"/>';
echo '</div></div>';
echo '<div class="progress">
// echo '<div><div class="facecrop">';
// echo '<img src="data:image/png;base64,'. $si["base64"].'" width="50" height="50" alt="'.$si["name"].'" align="left"/>';
// echo $symbol;
// // if(round($ci[$i]["Similarity"]) > 50){ echo '<center><h1>'.$equal_mark.'</h1></center>'; }else{ echo '<center><h1>'.$notequal_mark.'</h1></center>'; }
// echo '<img src="data:image/png;base64,'. $ci[$i]["base64"].'" width="50" height="50" alt="'.$ci[$i]["name"].'" align="right"/>';
// echo '</div></div>';
// echo '<div class="progress">
// <div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%">
// '.round($ci[$i]["Similarity"]).'
// </div>
// </div>';
echo '<div class="facecrop_row facecrop">
<div class="facecrop_column">
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
</div>
<div class="facecrop_column">'.$symbol.'</div>
<div class="facecrop_column">
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
</div>
</div>';
echo '<p style="text-align:left;">Similarity
<span style="float:right;">'.round($ci[$i]["Similarity"]).'</span>
</p>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%">
'.round($ci[$i]["Similarity"]).'
</div>
</div>';
}
// echo '<div class="container"></div>';
// ########################### End of Percentage Bar Section #########################################

View File

@ -5,6 +5,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<html lang="en" id="mydoc" onkeyup="saveEdits(event)">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<title></title>
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
<style type="text/css">
@ -467,7 +470,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding: 5px;
/*margin: 10px;*/
}
.facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; }
/* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;}
/* ######### TOOLTIP CSS END ######### */
@ -691,23 +697,58 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
$faceimage_url = '';
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
$faceimage_url = array();
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['is_face_api_enabled'] == 1)
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
$faceimage_url = $com_value['doc_url'];break;
}
}
// $faceimage_url = $com_value['doc_url'];break;
array_push($faceimage_url,$com_value['doc_url']);
}
}
}
if(!empty($faceimage_url)){
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo "</div>";
echo '<br>';
if(!empty($facecrop)){
$ci = !empty($facecrop[0]['compare_image']) ? $facecrop[0]['compare_image'] :array() ;
$si = !empty($facecrop[1]['source_image']) ? $facecrop[1]['source_image'] : array();
// ########################### Percentage Bar Section #########################################
echo "<h3>Face Comparison</h3>" ;
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
for ($i = 0; $i < count($ci); $i++) {
$symbol = (round($ci[$i]["Similarity"]) > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
echo '<div class="facecrop_row facecrop">
<div class="facecrop_column">
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
</div>
<div class="facecrop_column">'.$symbol.'</div>
<div class="facecrop_column">
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
</div>
</div>';
echo '<p style="text-align:left;">Similarity
<span style="float:right;">'.round($ci[$i]["Similarity"]).'</span>
</p>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%">
'.round($ci[$i]["Similarity"]).'
</div>
</div>';
}
// ########################### End of Percentage Bar Section #########################################
}

View File

@ -9,6 +9,9 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
<style type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
@ -477,7 +480,10 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa
font-size: 14px;
font-weight: bolder;;
}
.facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; }
/* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;}
/* ######### TOOLTIP CSS END ######### */
@ -712,26 +718,62 @@ if ( isset($pdf) ) {
}
$faceimage_url = '';
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
$faceimage_url = array();
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['is_face_api_enabled'] == 1)
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
$faceimage_url = $com_value['doc_url'];break;
}
}
// $faceimage_url = $com_value['doc_url'];break;
array_push($faceimage_url,$com_value['doc_url']);
}
}
}
if(!empty($faceimage_url)){
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo '</div>';
echo '<br>';
?>
<br>
<?php
if(!empty($facecrop)){
$ci = !empty($facecrop[0]['compare_image']) ? $facecrop[0]['compare_image'] :array() ;
$si = !empty($facecrop[1]['source_image']) ? $facecrop[1]['source_image'] : array();
// ########################### Percentage Bar Section #########################################
echo "<h3>Face Comparison</h3>" ;
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
for ($i = 0; $i < count($ci); $i++) {
$symbol = (round($ci[$i]["Similarity"]) > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
echo '<div class="facecrop_row facecrop">
<div class="facecrop_column">
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
</div>
<div class="facecrop_column">'.$symbol.'</div>
<div class="facecrop_column">
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
</div>
</div>';
echo '<p style="text-align:left;">Similarity
<span style="float:right;">'.round($ci[$i]["Similarity"]).'</span>
</p>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%">
'.round($ci[$i]["Similarity"]).'
</div>
</div>';
}
// ########################### End of Percentage Bar Section #########################################
}
?>
<p contenteditable="true"><b><?php echo $loan_word;?> Applicants:</b></p>
<table class="scorecard_table">

View File

@ -9,6 +9,9 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
<style type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
@ -470,7 +473,10 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa
padding: 5px;
/*margin: 10px;*/
}
.facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; }
/* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;}
/* ######### TOOLTIP CSS END ######### */
@ -710,26 +716,62 @@ if ( isset($pdf) ) {
}
$faceimage_url = '';
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
$faceimage_url = array();
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['is_face_api_enabled'] == 1)
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
$faceimage_url = $com_value['doc_url'];break;
}
}
// $faceimage_url = $com_value['doc_url'];break;
array_push($faceimage_url,$com_value['doc_url']);
}
}
}
if(!empty($faceimage_url)){
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo '</div>';
echo '<br>';
?>
<br>
<?php
if(!empty($facecrop)){
$ci = !empty($facecrop[0]['compare_image']) ? $facecrop[0]['compare_image'] :array() ;
$si = !empty($facecrop[1]['source_image']) ? $facecrop[1]['source_image'] : array();
// ########################### Percentage Bar Section #########################################
echo "<h3>Face Comparison</h3>" ;
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
for ($i = 0; $i < count($ci); $i++) {
$symbol = (round($ci[$i]["Similarity"]) > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
echo '<div class="facecrop_row facecrop">
<div class="facecrop_column">
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
</div>
<div class="facecrop_column">'.$symbol.'</div>
<div class="facecrop_column">
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
</div>
</div>';
echo '<p style="text-align:left;">Similarity
<span style="float:right;">'.round($ci[$i]["Similarity"]).'</span>
</p>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%">
'.round($ci[$i]["Similarity"]).'
</div>
</div>';
}
// ########################### End of Percentage Bar Section #########################################
}
?>
<p contenteditable="true"><b><?php echo $loan_word;?> Applicants:</b></p>
<table class="scorecard_table">

View File

@ -6,6 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
<style type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
@ -466,7 +469,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding: 5px;
/*margin: 10px;*/
}
.facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; }
/* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;}
/* ######### TOOLTIP CSS END ######### */
@ -678,26 +684,62 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
$faceimage_url = '';
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
$faceimage_url = array();
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['is_face_api_enabled'] == 1)
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
$faceimage_url = $com_value['doc_url'];break;
}
}
// $faceimage_url = $com_value['doc_url'];break;
array_push($faceimage_url,$com_value['doc_url']);
}
}
}
if(!empty($faceimage_url)){
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo '</div>';
echo '<br>';
?>
<br>
<?php
if(!empty($facecrop)){
$ci = !empty($facecrop[0]['compare_image']) ? $facecrop[0]['compare_image'] :array() ;
$si = !empty($facecrop[1]['source_image']) ? $facecrop[1]['source_image'] : array();
// ########################### Percentage Bar Section #########################################
echo "<h3>Face Comparison</h3>" ;
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
for ($i = 0; $i < count($ci); $i++) {
$symbol = (round($ci[$i]["Similarity"]) > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
echo '<div class="facecrop_row facecrop">
<div class="facecrop_column">
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
</div>
<div class="facecrop_column">'.$symbol.'</div>
<div class="facecrop_column">
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
</div>
</div>';
echo '<p style="text-align:left;">Similarity
<span style="float:right;">'.round($ci[$i]["Similarity"]).'</span>
</p>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%">
'.round($ci[$i]["Similarity"]).'
</div>
</div>';
}
// ########################### End of Percentage Bar Section #########################################
}
?>
<p contenteditable="true"><b>Loan Applicants:</b></p>
<table class="scorecard_table">

View File

@ -6,6 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
<style type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
@ -466,7 +469,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding: 5px;
/*margin: 10px;*/
}
.facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; }
/* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;}
/* ######### TOOLTIP CSS END ######### */
@ -678,26 +684,62 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
$faceimage_url = '';
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
$faceimage_url = array();
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['is_face_api_enabled'] == 1)
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
$faceimage_url = $com_value['doc_url'];break;
}
}
// $faceimage_url = $com_value['doc_url'];break;
array_push($faceimage_url,$com_value['doc_url']);
}
}
}
if(!empty($faceimage_url)){
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo '</div>';
echo '<br>';
?>
<br>
<?php
if(!empty($facecrop)){
$ci = !empty($facecrop[0]['compare_image']) ? $facecrop[0]['compare_image'] :array() ;
$si = !empty($facecrop[1]['source_image']) ? $facecrop[1]['source_image'] : array();
// ########################### Percentage Bar Section #########################################
echo "<h3>Face Comparison</h3>" ;
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
for ($i = 0; $i < count($ci); $i++) {
$symbol = (round($ci[$i]["Similarity"]) > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
echo '<div class="facecrop_row facecrop">
<div class="facecrop_column">
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
</div>
<div class="facecrop_column">'.$symbol.'</div>
<div class="facecrop_column">
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
</div>
</div>';
echo '<p style="text-align:left;">Similarity
<span style="float:right;">'.round($ci[$i]["Similarity"]).'</span>
</p>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%">
'.round($ci[$i]["Similarity"]).'
</div>
</div>';
}
// ########################### End of Percentage Bar Section #########################################
}
?>
<p contenteditable="true"><b>Loan Applicants:</b></p>
<table class="scorecard_table">

View File

@ -6,6 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
<style type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
@ -466,7 +469,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding: 5px;
/*margin: 10px;*/
}
.facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; }
/* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;}
/* ######### TOOLTIP CSS END ######### */
@ -679,27 +685,62 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
$faceimage_url = '';
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
$faceimage_url = array();
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['is_face_api_enabled'] == 1)
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
$faceimage_url = $com_value['doc_url'];break;
// $faceimage_url = $com_value['doc_url'];break;
array_push($faceimage_url,$com_value['doc_url']);
}
}
}
if(!empty($faceimage_url)){
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
}
if(!empty($faceimage_url)){
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo '</div>';
echo '<br>';
?>
<br>
<?php
if(!empty($facecrop)){
$ci = !empty($facecrop[0]['compare_image']) ? $facecrop[0]['compare_image'] :array() ;
$si = !empty($facecrop[1]['source_image']) ? $facecrop[1]['source_image'] : array();
// ########################### Percentage Bar Section #########################################
echo "<h3>Face Comparison</h3>" ;
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
for ($i = 0; $i < count($ci); $i++) {
$symbol = (round($ci[$i]["Similarity"]) > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
echo '<div class="facecrop_row facecrop">
<div class="facecrop_column">
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
</div>
<div class="facecrop_column">'.$symbol.'</div>
<div class="facecrop_column">
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
</div>
</div>';
echo '<p style="text-align:left;">Similarity
<span style="float:right;">'.round($ci[$i]["Similarity"]).'</span>
</p>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%">
'.round($ci[$i]["Similarity"]).'
</div>
</div>';
}
// ########################### End of Percentage Bar Section #########################################
}
?>
<p contenteditable="true"><b>Loan Applicants:</b></p>
<table class="scorecard_table">

View File

@ -6,6 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
<style type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
@ -465,7 +468,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding: 5px;
/*margin: 10px;*/
}
.facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; }
/* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;}
/* ######### TOOLTIP CSS END ######### */
@ -682,24 +688,58 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
//echo '</div>';
}
$faceimage_url = '';
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
$faceimage_url = array();
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['is_face_api_enabled'] == 1)
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
$faceimage_url = $com_value['doc_url'];break;
}
}
// $faceimage_url = $com_value['doc_url'];break;
array_push($faceimage_url,$com_value['doc_url']);
}
if(!empty($faceimage_url)){
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
}
}
if(!empty($faceimage_url)){
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo '<br>';
?>
<?php
if(!empty($facecrop)){
$ci = !empty($facecrop[0]['compare_image']) ? $facecrop[0]['compare_image'] :array() ;
$si = !empty($facecrop[1]['source_image']) ? $facecrop[1]['source_image'] : array();
// ########################### Percentage Bar Section #########################################
echo "<h3>Face Comparison</h3>" ;
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
for ($i = 0; $i < count($ci); $i++) {
$symbol = (round($ci[$i]["Similarity"]) > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
echo '<div class="facecrop_row facecrop">
<div class="facecrop_column">
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
</div>
<div class="facecrop_column">'.$symbol.'</div>
<div class="facecrop_column">
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
</div>
</div>';
echo '<p style="text-align:left;">Similarity
<span style="float:right;">'.round($ci[$i]["Similarity"]).'</span>
</p>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%">
'.round($ci[$i]["Similarity"]).'
</div>
</div>';
}
// ########################### End of Percentage Bar Section #########################################
}
?>
<!-- <br> -->
<p contenteditable="true"><b>Loan Applicants:</b></p>

View File

@ -6,6 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
<style type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
@ -472,7 +475,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
font-size: 14px;
font-weight: bolder;;
}
.facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; }
/* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;}
/* ######### TOOLTIP CSS END ######### */
@ -689,23 +695,59 @@ font-weight: bolder;;
}
//echo '</div>';
}
$faceimage_url = '';
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
$faceimage_url = array();
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['is_face_api_enabled'] == 1)
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
$faceimage_url = $com_value['doc_url'];break;
}
}
// $faceimage_url = $com_value['doc_url'];break;
array_push($faceimage_url,$com_value['doc_url']);
}
}
}
if(!empty($faceimage_url)){
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo '<br>';
?>
<?php
if(!empty($facecrop)){
$ci = !empty($facecrop[0]['compare_image']) ? $facecrop[0]['compare_image'] :array() ;
$si = !empty($facecrop[1]['source_image']) ? $facecrop[1]['source_image'] : array();
// ########################### Percentage Bar Section #########################################
echo "<h3>Face Comparison</h3>" ;
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
for ($i = 0; $i < count($ci); $i++) {
$symbol = (round($ci[$i]["Similarity"]) > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
echo '<div class="facecrop_row facecrop">
<div class="facecrop_column">
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
</div>
<div class="facecrop_column">'.$symbol.'</div>
<div class="facecrop_column">
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
</div>
</div>';
echo '<p style="text-align:left;">Similarity
<span style="float:right;">'.round($ci[$i]["Similarity"]).'</span>
</p>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%">
'.round($ci[$i]["Similarity"]).'
</div>
</div>';
}
// ########################### End of Percentage Bar Section #########################################
}
?>
<!-- <br> -->

View File

@ -6,6 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
<style type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
@ -465,7 +468,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding: 5px;
/*margin: 10px;*/
}
.facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; }
/* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;}
/* ######### TOOLTIP CSS END ######### */
@ -681,26 +687,61 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
$faceimage_url = '';
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
$faceimage_url = array();
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['is_face_api_enabled'] == 1)
{
foreach($pd_images['common_images'] as $com_key => $com_value)
{
foreach($pd_images['common_images'] as $com_key => $com_value)
if($com_value['pd_document_title'] == 'face_api_result_image')
{
if($com_value['pd_document_title'] == 'face_api_result_image')
{
$faceimage_url = $com_value['doc_url'];break;
}
// $faceimage_url = $com_value['doc_url'];break;
array_push($faceimage_url,$com_value['doc_url']);
}
}
if(!empty($faceimage_url)){
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
}
}
if(!empty($faceimage_url)){
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo '</div>';
}
echo '<br>';
?>
<?php
if(!empty($facecrop)){
$ci = !empty($facecrop[0]['compare_image']) ? $facecrop[0]['compare_image'] :array() ;
$si = !empty($facecrop[1]['source_image']) ? $facecrop[1]['source_image'] : array();
// ########################### Percentage Bar Section #########################################
echo "<h3>Face Comparison</h3>" ;
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
for ($i = 0; $i < count($ci); $i++) {
$symbol = (round($ci[$i]["Similarity"]) > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
echo '<div class="facecrop_row facecrop">
<div class="facecrop_column">
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
</div>
<div class="facecrop_column">'.$symbol.'</div>
<div class="facecrop_column">
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
</div>
</div>';
echo '<p style="text-align:left;">Similarity
<span style="float:right;">'.round($ci[$i]["Similarity"]).'</span>
</p>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%">
'.round($ci[$i]["Similarity"]).'
</div>
</div>';
}
// ########################### End of Percentage Bar Section #########################################
}
?>
<!-- <br> -->
<p contenteditable="true"><b>Loan Applicants:</b></p>