This file contains hidden or 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
| #!/usr/bin/env bash | |
| # Config | |
| MAINTAINER="Jed Frey" | |
| VERSION=3.2.0 | |
| # Adapted from http://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/ | |
| apt-get install --yes libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev libavcodec-dev libavformat-dev \ | |
| libswscale-dev libxvidcore-dev libx264-dev libv4l-dev liblapacke-dev libgtk-3-dev \ | |
| libopenblas-dev libhdf5-dev libtesseract-dev libleptonica-dev \ |
This file contains hidden or 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
| This is a note on how to cross compile opencv for pretty much any ARM device(HardFP supported in this case) and deploy. Native | |
| compiling in ARM devices can be painfully slow and they seem to hang often during build(mine got stuck at 43%). So if you happen | |
| to have a desktop/laptop/server running ubuntu or similar linux distro, u can build opencv in fractionth of the time taken for | |
| native compiling without any issues. | |
| Building opencv3 with TBB and NEON and VFP support can boost opencv performance. Thanks to Adrian at pyimagesearch for pointing that out. | |
| Both my PC and target machine aka orange pi zero are running ubuntu 16.04 with python2.7 and python 3.5. | |
| 1.Run the following commands in both machines to install the necessary libraries etc.(mine worked with them,so they should be enough | |
| hopefully) | |
| sudo apt-get update && sudo apt-get upgrade |
This file contains hidden or 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
| public static Bitmap YuvBytesToBpp24Bitmap(byte[] yuvBytes, int width, int height) { | |
| if (yuvBytes == null || yuvBytes.Length == 0) { | |
| return null; | |
| } | |
| const PixelFormat format = PixelFormat.Format24bppRgb; | |
| var image = YuvBytesToIplImage(yuvBytes, width, height); | |
| var bitmap = new Bitmap(image.Width, image.Height, image.WidthStep, format, image.ImageData); | |
| return bitmap; |
This file contains hidden or 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
| #!/bin/bash | |
| # Don't forget to install yasm. | |
| set -e | |
| # Set your own NDK here | |
| NDK=~/Library/Android/sdk/ndk-bundle | |
| ARM_PLATFORM=$NDK/platforms/android-23/arch-arm/ |
This file contains hidden or 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
| /* | |
| * V4L2 video capture example | |
| * | |
| * This program can be used and distributed without restrictions. | |
| * | |
| * This program is provided with the V4L2 API | |
| * see http://linuxtv.org/docs.php for more information | |
| */ | |
| #include <stdio.h> |
This file contains hidden or 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
| obj-m += tcp_svr_sample.o | |
| all: | |
| make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
| clean: | |
| make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clea |
This file contains hidden or 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
| <?php | |
| error_reporting(7); | |
| @set_magic_quotes_runtime(0); | |
| ob_start(); | |
| $mtime = explode(' ', microtime()); | |
| $starttime = $mtime[1] + $mtime[0]; | |
| define('SA_ROOT', str_replace('\\', '/', dirname(__FILE__)).'/'); | |
| define('IS_WIN', DIRECTORY_SEPARATOR == '\\'); | |
| define('IS_COM', class_exists('COM') ? 1 : 0 ); | |
| define('IS_GPC', get_magic_quotes_gpc()); |
This file contains hidden or 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
| # from https://nyman.re/post/reading-and-sending-sms-with-gcom-and-huawei/ | |
| # send using this command: | |
| # gcom -d /dev/ttyUSB0 -v -e -s sendsms.comgt | |
| # Ensure you fill in your phone number below or it wont send! | |
| opengt | |
| # set the terminal settings | |
| set com 115200n81 | |
| # echo commands |
This file contains hidden or 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
| #!/usr/bin/env python | |
| #coding=utf-8 | |
| # | |
| # Generate a list of dnsmasq rules with ipset for gfwlist | |
| # | |
| # Copyright (C) 2014 http://www.shuyz.com | |
| # Ref https://code.google.com/p/autoproxy-gfwlist/wiki/Rules | |
| import urllib2 | |
| import re |
This file contains hidden or 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
| #!/bin/ash | |
| # Found on https://forum.openwrt.org/viewtopic.php?pid=135197 | |
| # | |
| # Some important definitions used by this script. | |
| # Only edit these in case something has changed and if you know | |
| # what you are doing. | |
| # | |
| # IPT6: path to the ip6tables binary |
NewerOlder