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
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dat=t():e.dat=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(1),r=o(i);t.default=r.default,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(2),r=o(i),a=n(6),l=o(a),s=n(3),u=o(s),d=n(7),c=o(d),f=n(8),_=o(f),p=n(10),h=o(p),m=n(11),b=o(m),g=n(12),v=o(g),y=n(13),w=o(y),x=n(14),E=o(x),C=n(15),A=o(C),S=n(16),k=o(S),O=n(9),T=o(O),R=n(17),L=o(R);t.default={color:{Color:r.default,math:l.default,interpret:u.default},controllers:{Controller:c.default,BooleanController:_.default,OptionController:h.defau |
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
[ | |
{ | |
"userId": 1, | |
"id": 1, | |
"isFavourite": false, | |
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit", | |
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto" | |
}, | |
{ | |
"userId": 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
img = cv2.imread("test.jpg") | |
cv2.imshow("Orignal", img) | |
corner = img[0:200, 0:200] | |
cv2.imshow("Extracted", corner) |
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
# download numpy in using pip $ pip install numpy | |
# for instructions for installing opencv head over to : http://www.pyimagesearch.com/?s=install+opencv&submit=Search | |
import numpy as np | |
import cv2 |
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 | |
video = cv2.VideoCapture('Town.avi') | |
while video.isOpened(): | |
ret, frame = video.read() | |
# cvtColor in opencv is used to change colorspace | |
grayscale = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) | |
cv2.imshow('Orignal', frame) | |
cv2.imshow('Gray', grayscale) | |
cv2.waitKey(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
while video.isOpened(): | |
ret, frame = video.read() |
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
video = cv2.VideoCapture('path/to/image') |
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 | |
# loading as default colored image | |
img1 = cv2.imread("watch.jpg") | |
# loading image as grayscale image | |
img2 = cv2.imread('watch.jpg', cv2.IMREAD_GRAYSCALE) | |
#IMREAD_COLOR=1,IMREAD_UNCHANGED=-1,IMREAD_GRAYSCALE=0 | |
#loading unchanged image | |
img3 = cv2.imread('watch.jpg', cv2.IMREAD_UNCHANGED) | |
# showing images | |
cv2.imshow('COLORED_IMAGE', img1) |
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 | |
# loading as default colored image | |
img1 = cv2.imread('watch.jpg') | |
# loading image as grayscale image | |
img2 = cv2.imread('watch.jpg', cv2.IMREAD_GRAYSCALE) | |
#IMREAD_COLOR=1,IMREAD_UNCHANGED=-1,IMREAD_GRAYSCALE=0 | |
#loading unchanged image | |
img3 = cv2.imread('watch.jpg', cv2.IMREAD_UNCHANGED) | |
# showing images | |
cv2.imshow('COLORED_IMAGE', img1) |
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
cv2.IMREAD_COLOR: without alpha channel(this is by default so no need to pass it as parameter) | |
cv2.IMREAD_UNCHANGED: for loading image along with alpha channel | |
cv2.IMREAD_GRAYSCALE: for loading it in grayscale or single channeled image |