store captured image in MySQL database with Python and OpenCV
问题 I have a piece of code here which captures an image from my internal webcam on my laptop. With this image, i would like to directly send it to my MySQL database. here is the code. import numpy as np import cv2 import mysql.connector from mysql.connector import errorcode from time import sleep import serial # Obtain connection string information from the portal config = { 'host':'oursystem.mysql.database.azure.com', 'user':'user', 'password':'pass', 'database':'projectdb' } try: conn = mysql