fixes : ps
This commit is contained in:
parent
a46450a0e7
commit
4123f9e5e8
@ -989,7 +989,7 @@ class PD_Controller extends REST_Controller {
|
|||||||
{
|
{
|
||||||
$pd_details['complete_override_data'] = json_encode($pd_details['complete_override_data']);
|
$pd_details['complete_override_data'] = json_encode($pd_details['complete_override_data']);
|
||||||
$pd_details['completed_on'] = date('Y-m-d H:i:s');
|
$pd_details['completed_on'] = date('Y-m-d H:i:s');
|
||||||
log_message('ERROR',"PD Controller Completed Status Calling (toMakeFaceBoundingBox)");
|
log_message('ERROR',"PD Controller line no : 992 When Completed status means called (to Make FaceBoundingBox)");
|
||||||
$this->toMakeFaceBoundingBox($exist_pd_details);
|
$this->toMakeFaceBoundingBox($exist_pd_details);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11940,6 +11940,7 @@ public function getCompaniesListsFromGeneralFormRawJSONV2_post()
|
|||||||
// echo gettype($my_array);
|
// echo gettype($my_array);
|
||||||
if(!empty($my_array) && !empty($my_array["FaceMatches"])){
|
if(!empty($my_array) && !empty($my_array["FaceMatches"])){
|
||||||
$arr = $my_array["FaceMatches"];
|
$arr = $my_array["FaceMatches"];
|
||||||
|
log_message('ERROR',"to Make FaceBoundingBox FaceMatches array cnt : ".count($arr));
|
||||||
for($i=0;$i<count($arr);$i++){
|
for($i=0;$i<count($arr);$i++){
|
||||||
$bounding_box[$i] = $arr[$i]['Face']['BoundingBox'];
|
$bounding_box[$i] = $arr[$i]['Face']['BoundingBox'];
|
||||||
$bounding_box[$i]['Similarity'] = $arr[$i]['Similarity'];
|
$bounding_box[$i]['Similarity'] = $arr[$i]['Similarity'];
|
||||||
@ -11951,6 +11952,7 @@ public function getCompaniesListsFromGeneralFormRawJSONV2_post()
|
|||||||
$bucketname = LENDER_BUCKET_NAME_PREFIX.$master_details[0]['fk_lender_id'];
|
$bucketname = LENDER_BUCKET_NAME_PREFIX.$master_details[0]['fk_lender_id'];
|
||||||
$key = 'pd'.$pdid.'/'.$img_result[0]['pd_document_name'];
|
$key = 'pd'.$pdid.'/'.$img_result[0]['pd_document_name'];
|
||||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
||||||
|
log_message('ERROR',"to Make FaceBoundingBox FaceMatches singed_uri : ".$singed_uri);
|
||||||
|
|
||||||
// $temp_image_name = "sample.png";
|
// $temp_image_name = "sample.png";
|
||||||
$temp_image_name = "face_api_image.jpeg";
|
$temp_image_name = "face_api_image.jpeg";
|
||||||
@ -11964,16 +11966,17 @@ public function getCompaniesListsFromGeneralFormRawJSONV2_post()
|
|||||||
|
|
||||||
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>$sourcefile);
|
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>$sourcefile);
|
||||||
$s3result= $this->aws_s3->uploadFileToS3Bucket($bucket_data);
|
$s3result= $this->aws_s3->uploadFileToS3Bucket($bucket_data);
|
||||||
|
log_message('ERROR',"to Make FaceBoundingBox s3result : ".$s3result['@metadata']['statusCode']);
|
||||||
|
|
||||||
// print_r($s3result);die();
|
// print_r($s3result);die();
|
||||||
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
|
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
|
||||||
{
|
{
|
||||||
|
log_message('ERROR',"to Make FaceBoundingBox updating pdtrigger table facemark_image_generated as 1");
|
||||||
//Update
|
//Update
|
||||||
$this->db->WHERE('pd_id',$pdid)->UPDATE(PDTRIGGER,array('facemark_image_generated' => 1));
|
$this->db->WHERE('pd_id',$pdid)->UPDATE(PDTRIGGER,array('facemark_image_generated' => 1));
|
||||||
|
log_message('ERROR',"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'=>$temp_image_name);
|
$record_data = array('fk_pd_id' => $pdid,'pd_document_title'=>'face_api_result_image','pd_document_name'=>$temp_image_name);
|
||||||
$this->PD_Model->saveRecords($record_data,PDDOCUMENTS);
|
$this->PD_Model->saveRecords($record_data,PDDOCUMENTS);
|
||||||
|
|
||||||
unlink($destination_path);
|
unlink($destination_path);
|
||||||
}
|
}
|
||||||
// $data['dataStatus'] = true;
|
// $data['dataStatus'] = true;
|
||||||
|
|||||||
@ -3,8 +3,10 @@
|
|||||||
class faceapi
|
class faceapi
|
||||||
{
|
{
|
||||||
public static function toMakeFaceBoundingBox($image_name,$BoundingBox,$destination_path){
|
public static function toMakeFaceBoundingBox($image_name,$BoundingBox,$destination_path){
|
||||||
|
log_message('ERROR','####faceapi helper to Make FaceBoundingBox fns');
|
||||||
$get_image_format = explode(".",$image_name);
|
$get_image_format = explode(".",$image_name);
|
||||||
$image_format = $get_image_format[1];
|
$image_format = $get_image_format[1];
|
||||||
|
log_message('ERROR','####faceapi helper to Make FaceBoundingBox image_format'.$image_format);
|
||||||
// print_r($get_image_format);die();
|
// print_r($get_image_format);die();
|
||||||
// $img = imagecreatefrompng($destination_path);
|
// $img = imagecreatefrompng($destination_path);
|
||||||
if($image_format == 'png'){
|
if($image_format == 'png'){
|
||||||
@ -15,15 +17,12 @@ class faceapi
|
|||||||
$img = imagecreatefromjpg($destination_path);
|
$img = imagecreatefromjpg($destination_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$red = imagecolorallocate($img, 255, 0, 0);
|
$red = imagecolorallocate($img, 255, 0, 0);
|
||||||
$black = imagecolorallocate($img, 0, 0, 0);
|
$black = imagecolorallocate($img, 0, 0, 0);
|
||||||
$white = imagecolorallocate($img, 255, 255, 255);
|
$white = imagecolorallocate($img, 255, 255, 255);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
list($imagewidth, $imageheight) = getimagesize($destination_path);
|
list($imagewidth, $imageheight) = getimagesize($destination_path);
|
||||||
|
log_message('ERROR','####faceapi helper to Make FaceBoundingBox image_width'.$imagewidth.'image_height'.$imageheight);
|
||||||
for($i=0;$i<count($BoundingBox);$i++){
|
for($i=0;$i<count($BoundingBox);$i++){
|
||||||
|
|
||||||
$Left_coordinate = ($BoundingBox[$i]['Left'] * $imagewidth) ;
|
$Left_coordinate = ($BoundingBox[$i]['Left'] * $imagewidth) ;
|
||||||
@ -43,6 +42,7 @@ class faceapi
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function DrawLine($x1,$y1,$Face_width,$Face_height,$Similarity,$img,$destination_path){
|
public static function DrawLine($x1,$y1,$Face_width,$Face_height,$Similarity,$img,$destination_path){
|
||||||
|
log_message('ERROR','####faceapi helper Draw Line x1 : '.$x1.' y1 : '.$y1.' Face_width : '.$Face_width.' Face_height : '.$Face_height.' Similarity : '.$Similarity.' img : '.$img.' destination_path : '.$destination_path);
|
||||||
$Similarity_split = explode(".",$Similarity);
|
$Similarity_split = explode(".",$Similarity);
|
||||||
$Similarity_value = $Similarity_split[0];
|
$Similarity_value = $Similarity_split[0];
|
||||||
list($imagewidth, $imageheight) = getimagesize($destination_path);
|
list($imagewidth, $imageheight) = getimagesize($destination_path);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user