Skip to content

Instantly share code, notes, and snippets.

View IricsDo's full-sized avatar
:octocat:
Looking for someone

Do Duy IricsDo

:octocat:
Looking for someone
View GitHub Profile
@kittinan
kittinan / client.py
Last active November 15, 2024 15:35
Python OpenCV webcam send image frame over socket
import cv2
import io
import socket
import struct
import time
import pickle
import zlib
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(('192.168.1.124', 8485))
@Xonxt
Xonxt / main.cpp
Last active February 24, 2023 02:03
Sending a cv::Mat from C++ to a Python script
/*
This requires adding the "include" directory of your Python installation to the include diretories
of your project, e.g., in Visual Studio you'd add `C:\Program Files\Python36\include`.
You also need to add the 'include' directory of your NumPy package, e.g.
`C:\Program Files\PythonXX\Lib\site-packages\numpy\core\include`.
Additionally, you need to link your "python3#.lib" library, e.g. `C:\Program Files\Python3X\libs\python3X.lib`.
*/
// python bindings