Skip to content

Instantly share code, notes, and snippets.

View robosina's full-sized avatar
👋
Hi

Saeed Masoomi robosina

👋
Hi
View GitHub Profile
@robosina
robosina / cmake_graphviz.md
Last active January 5, 2023 14:18
CMake dependency generator

When you add --graphviz=graph/X.dot to the cmake command, it will generate some .dot files based on the dependencies you have. For unix based systems, you can use the following python code to generate svg for each dot file:

import os


# read all .dot files in a path
@robosina
robosina / main.cpp
Last active February 21, 2022 07:06
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <future>
#include <string>
#include <mutex>
#include <iomanip>
using namespace std::chrono_literals;
@robosina
robosina / ubuntu1804_dGPU_install_nv_deepstream.dockerfile
Created February 16, 2021 10:57 — forked from CasiaFan/ubuntu1804_dGPU_install_nv_deepstream.dockerfile
Dockerfile to prepare DeepStream in docker for Nvidia dGPUs (including Tesla T4, GeForce GTX 1080, RTX 2080 and so on)
From ubuntu:18.04 as base
# install github and vim
RUN apt-get install -y vim wget gnupg
ENV DEBIAN_FRONTEND "noninteractive" # to skip any interactive configurations during installation
RUN apt-get install -yq keyboard-configuration
# install gstreamer
RUN apt install -y \
@robosina
robosina / README.md
Created February 15, 2021 12:58 — forked from corenel/README.md
Install NVDEC and NVENC as GStreamer plugins

Install NVDEC and NVENC as GStreamer plugins

Environment

  • Ubuntu 18.04
  • NVIDIA driver 430.40
  • NVIDIA Video Codec SDK 9.0.20

Steps

@robosina
robosina / main.cpp
Created November 2, 2020 06:24
camera calibration in opencv
int main(int argc, char* argv[]) {
int n_boards = 0; // Will be set by input list
float image_sf = 0.5f;
float delay = 1.f;
int board_w = 0;
int board_h = 0;
if(argc < 4 || argc > 6) {
cout << "\nERROR: Wrong number of input parameters";
help( argv );
@robosina
robosina / main.cpp
Created October 22, 2020 09:23
MotionBlur in opencv c++
#include <opencv2/opencv.hpp>
using namespace cv;
#include <assert.h>
//#define normal
void CreateKernel(cv::Mat& kernel,
int KernelSize,
float angle /*angle is in degree format*/);
void motionBlur(cv::InputArray src,cv::Mat & dst,int angle,int kernel_size);
#include <QCoreApplication>
#include <QFile>
#include <QTextStream>
#include <QDebug>
void convert_date(QString& date)
{
date=date.mid(0,4)+"-"+date.mid(4,2)+"-"+date.mid(6,2);
}
int main(int argc, char *argv[])
{
struct GPUData {
int number_of_finger;
int number_of_cyliner;
float * q_theta_arrs;
int * x_arrs;
int * y_arrs;
unsigned long long* byte_arrs_offset0;
unsigned long long* byte_arrs_offset1;
unsigned long long* byte_arrs_offset2;
unsigned long long* byte_arrs_offset3;
@robosina
robosina / cuda_cpp_class.cu
Created April 5, 2020 11:33 — forked from lebedov/cuda_cpp_class.cu
How to "wrap" a CUDA kernel with a C++ class.
// How to "wrap" a CUDA kernel with a C++ class; the kernel must be defined outside of
// the class and launched from within a class instance's method.
#include <iostream>
#include <cuda.h>
#include <cuda_runtime.h>
#define LEN 10
__global__ void kernel(int *a, int *b, unsigned int N);