Skip to content

Instantly share code, notes, and snippets.

View crouchggj's full-sized avatar
🎯
Focusing

guanguojin crouchggj

🎯
Focusing
View GitHub Profile
import numpy as np
import cv2
import time
import sys
import os
sys.path.append(os.path.join(os.getcwd(), "samples/python/common/"))
sys.path.append(os.path.join(os.getcwd(), "samples/python/common/atlas_utils"))
print('System init success.')
@crouchggj
crouchggj / sample2.py
Created November 19, 2018 02:03
TensorRT python sample
#
# Copyright 1993-2018 NVIDIA Corporation. All rights reserved.
#
# NOTICE TO LICENSEE:
#
# This source code and/or documentation ("Licensed Deliverables") are
# subject to NVIDIA intellectual property rights under U.S. and
# international Copyright laws.
#
# These Licensed Deliverables contained herein is PROPRIETARY and
@crouchggj
crouchggj / Makefile
Created October 24, 2013 02:52
Linux KO Makefile
uvcvideo-objs := uvc_driver.o uvc_queue.o uvc_v4l2.o uvc_video.o uvc_ctrl.o \
uvc_status.o uvc_isight.o
obj-m += uvcvideo.o
KERNELDIR ?= /usr/src/linux-headers-3.8.0-19-generic/
PWD := $(shell pwd)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
@crouchggj
crouchggj / sep6500_jpeg.c
Created October 14, 2013 06:44
sep6200a v4l2 camera jpeg driver(inculde poll)
/*
*
* SEUIC CAMERA&JPEG Module
*
*kernel/driver/jpeg/sep6500_jpeg.c
*init this version
*08-17-2012 jyb my_member@163.com
*06-03-2013 Guanguojin guanguojing1989@126.com
*10-14-2013 Guanguojin guanguojing1989@126.com
*/
@crouchggj
crouchggj / client.c
Created October 9, 2013 00:46
Linux Socket Program(TCP client & server)
/*
* =====================================================================================
*
* Filename: client.c
*
* Description:
*
* Version: 1.0
* Created: 2013年08月19日 17时19分33秒
* Revision: none
@crouchggj
crouchggj / yuv2rgb.c
Created October 9, 2013 00:41
yuv422 transfer rgb
int convert_yuv_to_rgb_pixel(int y, int u, int v)
{
unsigned int pixel32 = 0;
unsigned char *pixel = (unsigned char *)&pixel32;
int r, g, b;
r = y + (1.370705 * (v-128));
g = y - (0.698001 * (v-128)) - (0.337633 * (u-128));
b = y + (1.732446 * (u-128));
if(r > 255) r = 255;
if(g > 255) g = 255;
@crouchggj
crouchggj / camera.c
Last active April 8, 2021 14:12
camera v4l2 operation
/*
* =====================================================================================
*
* Filename: camera.c
*
* Description:
*
* Version: 1.0
* Created: 2013年08月23日 15时54分17秒
* Revision: none