- git version should be above 2.9
$ git --version
git version 2.9.0.windows.1- Install husky into
package.jsonas a dev dependency$ npm install --save-dev husky
| { | |
| "presets": ["@babel/preset-env"] | |
| } |
| package com.solinvictus.EurekaNamingServer; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; | |
| @SpringBootApplication | |
| @EnableEurekaServer | |
| public class EurekaNamingServerApplication { |
| #running the file | |
| #python rtspcamera.py --rtsp --uri rtsp://192.168.1.8:8080/h264_pcm.sdp --width 1280 --height 720 | |
| def open_cam_rtsp(url, uri, width=1000, height=786, latency=0): | |
| gst_str = ('rtspsrc location={} latency={} ! ' | |
| 'rtph264depay ! h264parse ! omxh264dec ! ' | |
| 'nvvidconv ! ' | |
| 'video/x-raw, width=(int){}, height=(int){}, ' | |
| 'format=(string)BGRx ! ' | |
| 'videoconvert ! appsink').format(uri, latency, width, height) |
| """ | |
| http://stackoverflow.com/questions/28022432/receiving-rtp-packets-after-rtsp-setup | |
| A demo python code that .. | |
| 1) Connects to an IP cam with RTSP | |
| 2) Draws RTP/NAL/H264 packets from the camera | |
| 3) Writes them to a file that can be read with any stock video player (say, mplayer, vlc & other ffmpeg based video-players) | |
| Done for educative/demonstrative purposes, not for efficiency..! |
| ''' | |
| Below code helps you import datasets from google drive. | |
| It will label the images by folder name they are stored | |
| in so the dataset must be in different folders all inside | |
| the dataset folder. | |
| ''' | |
| from google.colab import drive | |
| drive.mount('/content/gdrive') | |
| imagePaths=sorted(list(paths.list_images('/content/gdrive/My Drive/dataset/'))) |
| import numpy as np | |
| import cv2 | |
| import urllib.request | |
| url = "http://192.168.1.8:8080/shot.jpg" #always use http://<ipcam ipaddress>:<portno>/shot.jpg as url | |
| while True: | |
| with urllib.request.urlopen(url) as resp: | |
| imgNp=np.array(bytearray(resp.read()), dtype=np.uint8) | |
| img=cv2.imdecode(imgNp, -1) | |
| gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
| cv2.imshow("response", gray) |
| # -------------------------------------------------------- | |
| # Camera sample code for Tegra X2/X1 | |
| # | |
| # This program could capture and display video from | |
| # IP CAM, USB webcam, or the Tegra onboard camera. | |
| # Refer to the following blog post for how to set up | |
| # and run the code: | |
| # https://jkjung-avt.github.io/tx2-camera-with-python/ | |
| # | |
| # Written by JK Jung <jkjung13@gmail.com> |