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
> make install | |
... | |
-- Up-to-date: C:/prog/Python37/Lib/site-packages/cv2/__init__.py | |
-- Up-to-date: C:/prog/Python37/Lib/site-packages/cv2/load_config_py2.py | |
-- Up-to-date: C:/prog/Python37/Lib/site-packages/cv2/load_config_py3.py | |
-- Up-to-date: C:/prog/Python37/Lib/site-packages/cv2/config.py | |
-- Up-to-date: C:/prog/Python37/Lib/site-packages/cv2/misc/__init__.py | |
-- Up-to-date: C:/prog/Python37/Lib/site-packages/cv2/misc/version.py | |
-- Up-to-date: C:/prog/Python37/Lib/site-packages/cv2/mat_wrapper/__init__.py | |
-- Up-to-date: C:/prog/Python37/Lib/site-packages/cv2/utils/__init__.py |
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
static PyObject* pyopencv_cv_calcHist(PyObject* , PyObject* py_args, PyObject* kw) | |
{ | |
using namespace cv; | |
pyPrepareArgumentConversionErrorsStorage(2); | |
{ | |
PyObject* pyobj_images = NULL; | |
vector_Mat images; | |
PyObject* pyobj_channels = NULL; |
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
!git clone https://github.com/opencv/opencv | |
!git clone https://github.com/opencv/opencv_contrib | |
!mkdir /content/build | |
%cd /content/build | |
!cmake -DOPENCV_EXTRA_MODULES_PATH=/content/opencv_contrib/modules \ | |
-DBUILD_SHARED_LIBS=OFF \ | |
-DBUILD_TESTS=OFF \ | |
-DBUILD_PERF_TESTS=OFF \ | |
-DBUILD_EXAMPLES=OFF \ |
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
template<class _Tp> | |
struct WeightedBoxesFusion { | |
typedef Rect_<_Tp> RECT; | |
struct Box { | |
int label; | |
float x1,y1,x2,y2, score, weight; | |
Box() {} | |
Box(int label, float x1,float y1,float x2,float y2, float score, float weight) |
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
""" | |
using cv2, open a webcam and record a video file | |
""" | |
def rec(cap_id, vid_filename): | |
cap = cv2.VideoCapture(cap_id) | |
fourcc = cv2.VideoWriter_fourcc(*'XVID') | |
out = cv2.VideoWriter(vid_filename, fourcc, 20.0, (640,480)) | |
while(cap.isOpened()): | |
ret, frame = cap.read() | |
if ret==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
#include "opencv2/opencv.hpp" | |
using namespace cv; | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int IMAGE_SIZE = 513; | |
cv::Mat faceImg= cv::imread("C:/data/persons/unsorted/139539.png"); |
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
# i ran this on colab to convert the pth to onnx, so opencv can read it ! | |
import torch; | |
import torch.nn as nn | |
import torch.nn.functional as F | |
class SPCH2FLM(nn.Module): | |
def __init__(self, numFilters=64, filterWidth=21): | |
super(SPCH2FLM, self).__init__() | |
self.numFilters = numFilters |
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
code running https://berak.pythonanywhere.com/ | |
run get_model.sh to download the pretrained 'unet.onnx' | |
wsgi.py is a webserver, receiving images of indoor scenes and sending back depth images. | |
up.html is the main webpage |
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
input: "img0" | |
input: "img1" | |
input_shape { | |
dim: 1 | |
dim: 3 | |
dim: 720 | |
dim: 1280 | |
} | |
input_shape { | |
dim: 1 |
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
#include <iostream> | |
#include <opencv2/opencv.hpp> | |
using namespace cv; | |
using namespace std; | |
using namespace cv; | |
using namespace std; | |
int main(int argc, char** argv) { | |
string folder = "c:/data/dnn/tcnn/"; |
NewerOlder