This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
from matplotlib import pyplot as plt | |
image = cv2.imread("berry.jpg") | |
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) | |
plt.axis("off") | |
plt.imshow(image, interpolation="nearest") | |
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8 FATAL_ERROR) | |
project(cv_plugin) | |
find_package(gazebo REQUIRED) | |
include_directories(${GAZEBO_INCLUDE_DIRS}) | |
link_directories(${GAZEBO_LIBRARY_DIRS}) | |
list(APPEND CMAKE_CXX_FLAGS "${GAZEBO_CXX_FLAGS}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import cv2 | |
import numpy as np | |
import struct | |
HOST = '127.0.0.1' | |
PORT = 5005 | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.bind((HOST, PORT)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import time | |
import struct | |
import cv2 | |
capture = cv2.VideoCapture(0) | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
sock.connect(('127.0.0.1', 5005)) | |
while True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"logging": { | |
"version": 1, | |
"disable_existing_loggers": true, | |
"formatters": { | |
"single-line": { | |
"class": "logging.Formatter", | |
"style": "{", | |
"datefmt": "%I:%M:%S", | |
"format": "{levelname:8s}; {asctime:s}; {name:<15s} {lineno:4d}; {message:s}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import socket | |
import struct | |
from datetime import datetime | |
cap = cv2.VideoCapture(1) | |
fps = cap.get(cv2.CAP_PROP_FPS) | |
font = cv2.FONT_HERSHEY_SIMPLEX | |
JPEG_QUALITY = 70 | |
encode_param = [int(cv2.IMWRITE_JPEG_QUALITY), JPEG_QUALITY] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import sys | |
import struct | |
import cv2 | |
import numpy as np | |
BUFFER_SIZE = 1024 | |
ADDR = ("127.0.0.1", 5252) | |
HEADER_START = b"START" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import os | |
import cv2 | |
import gi | |
import signal | |
import threading | |
gi.require_version('Gst', '1.0') | |
from gi.repository import Gst, GObject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gi | |
gi.require_version('Gst', '1.0') | |
import traceback | |
import sys | |
from gi.repository import Gst, GObject | |
import multiprocessing | |
class base(): | |
def __init__(self, name): | |
self.pipeline = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
import time | |
from timeit import default_timer as timer | |
HEIGHT=480 | |
WIDTH=640 | |
FONT=cv2.FONT_HERSHEY_SIMPLEX | |
bottomLeftCornerOfText = (100,100) |
OlderNewer