how do I extract all pixel values from a certain ROI and then store it as a CSV file and again use that csv file to get back that ROI

import cv2 import dlib import numpy as np img = cv2.imread(“Aayush.jpg”) img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) msk = np.zeros_like(img_gray) detector = dlib.get_frontal_face_detector() predictor = dlib.shape_predictor(“shape_predictor_68_face_landmarks.dat”) faces = detector(img_gray) for face in faces: landmarks = predictor(img_gray, face) lp = [] for n in range(0,68): x = landmarks.part(n).x y = landmarks.part(n).y lp.append((x,y)) p = np.array(lp, np.int32) #cv2.circle(img, (x,y),…

Details

Why is postgres in psql different from executing in php with pg_query [closed]

I am executing a postgresql in php with pg_query() but i don’t get the same result as when i execute it from the psql command line. “SELECT bidbond.com_name company_name, com_phone, com_address,org_name, org_address, project_title, bond_type, bond_amount, duration, duration_type, contract_sum, reg_date FROM bidbond INNER JOIN branch ON bidbond.insurance_branch_id=branch._id where user_id=$id” The above code executes alright on the…

Details

CSV – Processing all the rows with same value at once [closed]

I have a large CSV file with the following headers “sku”,”year”,”color”,”price”,”discount”,”inventory”,”published_on”,”rate”,”demographic”,”tags” and I’d like to be able to process once at the time all the rows having the same “sku”,”year”,”color” without loading all the file at the beginning or creating a huge data structure (array/hash) containing all the rows. I’m trying to create a loop…

Details