I have an array of strings. Each row of the string contains 1440 "numbers". Using the code below the program runs fine but when I check the feature column via pgAdmin it is empty. The column "image" which contains the path of the image and is primary key, is filled correctly. If I try to save the feature into "image" columns I get an error that there is now enough space:
index row size 2896 exceeds maximum 2712 for index
But I don't think that this is a problem when I save the array into "feature" column because I get no error.
for imagePath in glob.glob(args["dataset"] + "/*.jpg"):
# Get the image
imageID = imagePath[imagePath.rfind("/") + 1:]
image = cv2.imread(imagePath)
# Find the features
features = cd.describe(image)
# Put the features into DB
features = [str(f) for f in features]
cursor.execute("insert into index (image,feature) values (%s,%s);", (imageID,features))
conn.commit()
conn.close()
UPDATE: It seems that it was a pgAdmin related problem, because if I fetch the column I get all the numbers.