顯示具有 OpenCV 標籤的文章。 顯示所有文章
顯示具有 OpenCV 標籤的文章。 顯示所有文章

2023/05/13

macOS Build OpenCV 4.7.0 to WebAssembly

還沒安裝Emscripten可以先查閱macOS 安裝 Emscripten 3.1.39,配置好後就開始編譯吧
git clone https://github.com/opencv/opencv.git
emcmake python ./opencv/platforms/js/build_js.py build_wasm --build_wasm
cd ./build_wasm/bin/ && open .
接著打開loader.js會如下:

2018/05/30

Windows 10 Install OpenCV 3.4.1


輸入下方指令安裝

wget https://download.lfd.uci.edu/pythonlibs/c3ylw7lc/opencv_python-3.4.1+contrib-cp36-cp36m-win_amd64.whl
pip install opencv_python-3.4.1+contrib-cp36-cp36m-win_amd64.whl


測試可以輸入下方程式碼

import cv2
print(cv2.__version__)


Install OpenCV 3.4.1 on Raspberry Pi Zero W

編譯OpenCV花的時間真的很久...

先輸入下方指令更新

sudo apt-get update
sudo apt-get upgrade


安裝編譯需要使用到的套件

sudo apt-get install -y build-essential cmake pkg-config


接著再安裝OpenCV會用到的套件

sudo apt-get -y install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libatlas-base-dev gfortran python3.5-dev 

接著下載OpenCV

2015/10/13

Android OpenCV putText

最近的案子要即時去取得RGB,不過先試試看OpenCV寫在Android上的範本
使用OpenCV前手機必須安裝OpenCV Manager,且必須進行初始化
安裝OpenCV可以從Google play上進行安裝或者用adb的方式將OpenCV-android-sdk\apk底下的apk安裝進去

XML:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.example.test.MainActivity" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true" />

</RelativeLayout>

2014/02/07

C++ OpenCV 擷取Webcam視訊

本篇程式碼參考『[OpenCV]影像處理API-OpenCV介紹與安裝教學(OpenCV2.4.x在VS2012)


OpenCV有幾下幾種模組,分別是

core: The Core Functionality
imgproc: Image Processing
highgui: High-level GUI and Media I/O
video: Video Analysis
calib3d: Camera Calibration and 3D Reconstruction
features2d: 2D Features Framework
objdetect: Object Detection
ml: Machine Learning
flann: Clustering and Search in Multi-Dimensional Spaces
gpu: GPU-accelerated Computer Vision
photo: Computational Photography
stitching: Images stitching
nonfree: Non-free functionality
contrib: Contributed/Experimental Stuff
legacy: Deprecated stuff
ocl: OpenCL-accelerated Computer Vision
superres: Super Resolution