日B视频 亚洲,啪啪啪网站一区二区,91色情精品久久,日日噜狠狠色综合久,超碰人妻少妇97在线,999青青视频,亚洲一区二卡,让本一区二区视频,日韩网站推荐

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

如何制作監(jiān)控?cái)z像機(jī)

454398 ? 來(lái)源:wv ? 2019-09-03 11:30 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

第1步:我們需要什么

物理計(jì)算

Arduino Uno(或另一個(gè)工作的微控制器

伺服(我使用parralax標(biāo)準(zhǔn)伺服)

Red led

220k電阻

5x電線

Javascript

P5.js

P5 DOM庫(kù)

P5串行庫(kù)

P5串行控制(處理串行通信的小程序)

ML5.js

對(duì)象

MDF 4mm

底漆噴涂

白色噴漆

淺灰色噴涂油漆

黑色噴漆

黑色太陽(yáng)鏡鏡片(或其他)

第2步:進(jìn)行姿勢(shì)估計(jì)工作

如何制作監(jiān)控?cái)z像機(jī)

首先我們要編寫識(shí)別人類的草圖并在它的鼻子上放一個(gè)點(diǎn)。目標(biāo)是從這一點(diǎn)獲取水平X數(shù)據(jù)并將其發(fā)送到Arduino。

讓我們開(kāi)始吧!

在這個(gè)項(xiàng)目中,我們需要一些文件或庫(kù)來(lái)使一切正常工作:

p5.js (您可以下載完整的軟件包,因?yàn)檫@包括DOM庫(kù))

p5 DOM

p5串口(我使用了包中包含的示例中的p5.serialport.js文件) )

ML5.js(您可以將其作為鏈接包含在內(nèi),或者您可以通過(guò)這種方式下載整個(gè)本地庫(kù),這樣您就不需要連接互聯(lián)網(wǎng)以使一切正常工作)

我們擁有所有這些,我們可以將所有內(nèi)容鏈接到一個(gè)簡(jiǎn)單的HTML文件中:

接下來(lái)是我們的sketch.js文件,其中所有的魔法都發(fā)生了!

var serial;

var portName = ‘COM6’; // fill in your serial port name here, you can check the right port in Arduino or P5 serial control

var options = {

baudrate: 19200 //baudrate has to be the same in arduino

};

// this is the message that will be sent to the Arduino:

var oneMessage;

let video;

let poseNet;

let poses = [];

var noseX = []

var ifPerson = true;

//var flipHorizontal = false;

function setup() {

createCanvas(640, 480);

video = createCapture(VIDEO);

video.size(width, height);

frameRate(10);

//--------------------------------------

serial = new p5.SerialPort();

// Get a list the ports available

// You should have a callback defined to see the results. See gotList, below:

serial.list();

// Assuming our Arduino is connected, open the connection to it

serial.open(portName, options);

// When you get a list of serial ports that are available

serial.on(‘list’, gotList);

// When you some data from the serial port

serial.on(‘data’, gotData);

//-----------------------------------------

// Create a new poseNet method with a single detection

poseNet = ml5.poseNet(video, {

flipHorizontal: true,

detectionType: ‘single’

}, modelReady);

// This sets up an event that fills the global variable “poses”

// with an array every time new poses are detected

poseNet.on(‘pose’, function (results) {

poses = results;

if (results.length == 0) {

ifPerson = false;

}

//console.log(‘results: ’ + results);

});

// Hide the video element, and just show the canvas

video.hide();

}

function modelReady() {

select(‘#status’).html(‘Model Loaded’);

}

function draw() {

image(video, 0, 0, width, height);

// We can call both functions to draw all keypoints

drawKeypoints();

if (ifPerson == false) {

serial.write(‘c’);

console.log(“X”);

ifPerson = true;

} else {

oneMessage = map(oneMessage, 1, 640, 65, 115);

serial.write(oneMessage);

console.log(“browser: ” + oneMessage);

}

}

//---------------------------------

// Got the list of ports

function gotList(thelist) {

console.log(“List of Serial Ports:”);

// theList is an array of their names

for (var i = 0; i 《 thelist.length; i++) {

// Display in the console

console.log(i + “ ” + thelist[i]);

}

}

// Called when there is data available from the serial port

function gotData() {

var currentString = serial.readLine();

console.log(currentString);

}

//-------------------------------------

// A function to draw ellipses over the detected keypoints

function drawKeypoints() {

// Loop through all the poses detected

for (let i = 0; i 《 poses.length; i++) {

// For each pose detected, loop through all the keypoints

for (let j = 0; j 《 poses[i].pose.keypoints.length; j++) {

// A keypoint is an object describing a body part (like rightArm or leftShoulder)

let keypoint = poses[i].pose.keypoints[“0”];

noseX[i] = keypoint.position.x.toFixed(0);

oneMessage = (parseInt(noseX[0],10));

//console.log(typeof(oneMessage));

select(‘#noseX_1’).html(noseX.toString());

//console.log(typeof(oneMessage))

// Only draw an ellipse is the pose probability is bigger than 0.2

if (keypoint.score 》 0.2) {

fill(255, 0, 0);

noStroke();

ellipse(keypoint.position.x, keypoint.position.y, 10, 10);

}

}

}

}

就是這樣!如果您打開(kāi)html文件,您將看到網(wǎng)絡(luò)攝像頭鏡頭上方有一個(gè)紅點(diǎn)但鏡像(否則您的伺服將遠(yuǎn)離您)。您還將看到發(fā)送到Arduino的X數(shù)據(jù)

第3步:使用P5.serialcontrol

這是一個(gè)快速的。為了建立我的草圖和Arduino之間的串行通信,我們需要一個(gè)處理所有串行數(shù)據(jù)的中間人將它發(fā)送到另一個(gè)。以前人們會(huì)使用不太友好的Node.js,p5.serialcontrol修復(fù)了這個(gè)問(wèn)題。你可以在這里下載p5.serialcontrol。對(duì)于Windows用戶,請(qǐng)查看Alpha 5版本。

可悲的是,p5.serialcontrol并不完美,有時(shí)會(huì)崩潰。所以要小心你發(fā)送了多少數(shù)據(jù)。

步驟4:一切Arduino

接下來(lái)是Arduino代碼并連接伺服和LED。

#include

Servo myservo;

const int redPin = 12;

int newval1, oldval1;

int servoValue;

int space = 2;

int ledState = LOW;

int pos = 0;

unsigned long currentMillis = 0; // stores the value of millis() in each iteration of loop()

unsigned long previousServoMillis = 0; // the time when the servo was last moved

unsigned long previousMillis = 0;

const long interval = 500;

int servoPosition = 90;

int servoSlowInterval = 60; // millisecs between servo moves

int servoFastInterval = 10;

int servoInterval = servoSlowInterval; // initial millisecs between servo moves

int servoDegrees = 2; // amount servo moves at each step

int servoMinDegrees = 45; // will be changed to negative value for movement in the other direction

int servoMaxDegrees = 135;

int increment; // increment to move for each interval

int updateInterval; // interval between updates

unsigned long lastUpdate; // last update of position

int counter = 0;

bool executed = false;

void servoSweep() {

if (currentMillis - previousServoMillis 》= servoInterval) {

previousServoMillis += servoInterval;

servoPosition = servoPosition + servoDegrees; // servoDegrees might be negative

if (servoPosition 《= servoMinDegrees) {

// when the servo gets to its minimum position change the interval to change the speed

if (servoInterval == servoSlowInterval) {

servoInterval = servoSlowInterval; //servoFastInterval

}

else {

servoInterval = servoSlowInterval;

}

}

if ((servoPosition 》= servoMaxDegrees) || (servoPosition 《= servoMinDegrees)) {

// if the servo is at either extreme change the sign of the degrees to make it move the other way

servoDegrees = - servoDegrees; // reverse direction

// and update the position to ensure it is within range

servoPosition = servoPosition + servoDegrees;

}

// make the servo move to the next position

myservo.write(servoPosition);

digitalWrite(redPin, LOW);

// and record the time when the move happened

}

void ledBlink () {

if (currentMillis - previousMillis 》= interval) {

previousMillis = currentMillis;

if (ledState == LOW) {

ledState = HIGH;

} else {

ledState = LOW;

}

digitalWrite(redPin, ledState);

}

}

void setup() {

myservo.attach(9); // servo

Serial.begin(19200); // initialize serial communication

//Serial.setTimeout(10);

pinMode(redPin, OUTPUT);

myservo.write(90);

}

void loop() {

currentMillis = millis();

if (executed == false) {

servoSweep();

delay(50);

}

}

void serialEvent () {

while (Serial.available()) {

newval1 = Serial.read(); //read it

//Serial.println(newval1);

if (newval1 》 0 && newval1 != ‘c’) {

executed = true;

ledBlink();

//if (newval1 《 (oldval1 - space) || newval1 》 (oldval1 + space)) { //dead band setup

myservo.write(newval1);

delay(15);

//oldval1 = newval1;

//}

}

if (newval1 == ‘c’) {

executed = false;

}

}

}

正如您所看到的,我使用了不使用delay()的代碼,因此可以隨時(shí)停止掃描功能,即如果某人被識(shí)別。

在此之后,您可以測(cè)試整個(gè)系統(tǒng)。首先插入你的Arduino與led和伺服(我在我的箭頭上進(jìn)行測(cè)試),然后啟動(dòng)p5.serialcontrol然后打開(kāi)html文件。如果一切正常,箭頭將始終指向您。如果您走出網(wǎng)絡(luò)攝像頭捕獲的圖像,伺服將掃描。

第5步:制作安全攝像頭

所有這些軟件和代碼都讓我們開(kāi)始制作東西!

我模仿了安全攝像頭的這個(gè)原型,并為激光切割機(jī)設(shè)計(jì)了它。我用木膠組裝了這些碎片。相機(jī)內(nèi)部有足夠的空間容納Arduino,它需要一些額外的孔才能將所有電線都放入其中。我還將LED放置在正確的位置,并在前面安裝了黑色鏡頭,以提供額外的安全攝像頭效果。我用一些塑料薄膜消除了led燈的光線。

接下來(lái),我準(zhǔn)備整個(gè)事情并用典型的安全攝像頭顏色繪制它。

步驟6:安裝備注

關(guān)于在某處設(shè)置此安裝的最后一些評(píng)論。安全攝像頭本身沒(méi)有攝像頭攝像頭,可以看到前面的人。我所做的是將網(wǎng)絡(luò)攝像頭隱藏在支柱中并在其前面放置一個(gè)帶孔的海報(bào),以隱藏相機(jī),這對(duì)于創(chuàng)造正確的效果至關(guān)重要。

您還可以做的就是放置相機(jī)處于一個(gè)更典型的安全攝像頭位置,就像掛在天花板或墻壁上一樣。但你可以用它做任何你想做的事!

第7步:結(jié)束結(jié)果

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問(wèn)題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評(píng)論

    相關(guān)推薦
    熱點(diǎn)推薦

    索尼即將推出R系列系統(tǒng)攝像機(jī)

    索尼電子將推出新系列系統(tǒng)攝像機(jī),涵蓋五個(gè)型號(hào)——HDC?5500R, HDC?5500RV, HDC?3500R, HDC?3500RV和HDC?3200R,統(tǒng)稱為R系列;同時(shí)還將推出攝像機(jī)控制單元HDCU-3500R與3D LUT選件板HKCU-LUT351。
    的頭像 發(fā)表于 04-22 14:11 ?296次閱讀

    新手怎么操作防水攝像機(jī)氣密性檢測(cè)儀-岳信儀器

    對(duì)于新手而言,防水攝像機(jī)氣密性檢測(cè)儀的操作無(wú)需擔(dān)心,只要遵循“準(zhǔn)備-調(diào)試-檢測(cè)-收尾”四步,就能快速上手,輕松完成防水攝像機(jī)的密封檢測(cè),避免因操作不當(dāng)影響檢測(cè)結(jié)果。以下是詳細(xì)的操作步驟,簡(jiǎn)單易懂
    的頭像 發(fā)表于 03-23 11:27 ?165次閱讀
    新手怎么操作防水<b class='flag-5'>攝像機(jī)</b>氣密性檢測(cè)儀-岳信儀器

    FCB-EV9520L與CM2002V組合:寬動(dòng)態(tài)監(jiān)控攝像機(jī)的技術(shù)融合與應(yīng)用突破

    協(xié)同,為寬動(dòng)態(tài)(WDR)監(jiān)控提供了系統(tǒng)性解決辦法。這一技術(shù)融合不僅突破了傳統(tǒng)攝像機(jī)在明暗對(duì)比場(chǎng)景中的性能局限,還通過(guò)多維度適配能力重新確立了專業(yè)級(jí)監(jiān)控設(shè)備的行業(yè)標(biāo)準(zhǔn)。
    的頭像 發(fā)表于 03-17 15:45 ?1269次閱讀

    索尼AI智能構(gòu)圖PTZ攝像機(jī)迎來(lái)固件更新

    2026年1月29日,索尼(中國(guó))有限公司表示今年4月起,將面向PTZ攝像機(jī)用戶推出一系列固件升級(jí),包括AI智能構(gòu)圖旗艦PTZ攝像機(jī)BRC-AM7 固件Ver. 3.0版與AI智能構(gòu)圖PTZ攝像機(jī)
    的頭像 發(fā)表于 02-03 09:39 ?994次閱讀

    車載方艙用升降避雷針 通信基站升降桿 攝像機(jī)桅桿天線桿裝置

    攝像機(jī)
    jf_14142521
    發(fā)布于 :2025年12月31日 16:26:01

    MS41908M,網(wǎng)絡(luò)攝像機(jī)·監(jiān)控攝像機(jī)用鏡頭驅(qū)動(dòng)芯片(內(nèi)置光圈控制)

    MS41908M 是一款用于網(wǎng)絡(luò)攝像機(jī)監(jiān)控攝像機(jī)的鏡頭驅(qū)動(dòng)芯片,芯片內(nèi)置光圈控制功能;通過(guò)電壓驅(qū)動(dòng)方式以及扭矩紋 波修正技術(shù),實(shí)現(xiàn)了超低噪聲微步驅(qū)動(dòng)。 ? 主要特點(diǎn) 電壓驅(qū)動(dòng)方式,256 微步驅(qū)動(dòng)
    的頭像 發(fā)表于 11-25 14:42 ?545次閱讀
    MS41908M,網(wǎng)絡(luò)<b class='flag-5'>攝像機(jī)</b>·<b class='flag-5'>監(jiān)控</b><b class='flag-5'>攝像機(jī)</b>用鏡頭驅(qū)動(dòng)芯片(內(nèi)置光圈控制)

    智能機(jī)型崛起,傳統(tǒng)安防攝像機(jī),要被 “拍死” 在沙灘上了?

    傳統(tǒng)安防攝像機(jī)面臨智能化挑戰(zhàn),多模態(tài)智能攝像機(jī)通過(guò)多傳感器融合實(shí)現(xiàn)全場(chǎng)景感知與智能分析,重構(gòu)安防監(jiān)控核心能力。
    的頭像 發(fā)表于 11-03 09:25 ?827次閱讀
    智能機(jī)型崛起,傳統(tǒng)安防<b class='flag-5'>攝像機(jī)</b>,要被 “拍死” 在沙灘上了?

    HTD9901鏡頭驅(qū)動(dòng)芯片:攝像機(jī)與安防監(jiān)控的核心動(dòng)力保障

    ? ? ? 在攝像機(jī)與安全監(jiān)控攝像頭的運(yùn)行體系中,鏡頭驅(qū)動(dòng)芯片如同“神經(jīng)中樞”,直接決定了設(shè)備縮放、調(diào)焦的精準(zhǔn)度與運(yùn)行穩(wěn)定性,而HTD9901正是為滿足這一核心需求量身打造的專業(yè)鏡頭驅(qū)動(dòng)芯片,其內(nèi)
    的頭像 發(fā)表于 10-22 16:52 ?771次閱讀
    HTD9901鏡頭驅(qū)動(dòng)芯片:<b class='flag-5'>攝像機(jī)</b>與安防<b class='flag-5'>監(jiān)控</b>的核心動(dòng)力保障

    電動(dòng)升降桅桿 戶外可移動(dòng)升降桿 監(jiān)控照明攝像機(jī)伸縮支架

    攝像機(jī)
    jf_14142521
    發(fā)布于 :2025年07月10日 19:05:19

    快速自動(dòng)聚焦4K攝像機(jī)模組——索尼FCB-ER8530

    攝像機(jī)
    szxuanzhan
    發(fā)布于 :2025年06月09日 16:12:27

    松下推出專業(yè)級(jí)手持攝像機(jī)AG-CX100MC

    松下公司近期發(fā)布了專為視頻制作、廣播電視及流媒體分發(fā)領(lǐng)域量身打造的專業(yè)級(jí)手持攝像機(jī)——AG-CX100MC。該攝像機(jī)支持4K 60p 10-bit超高清拍攝,旨在為專業(yè)用戶帶來(lái)極致的影像體驗(yàn)。
    的頭像 發(fā)表于 05-29 09:23 ?1922次閱讀

    IPC網(wǎng)絡(luò)攝像機(jī)的靜電和浪涌保護(hù)方案

    概述IPC網(wǎng)絡(luò)攝像機(jī)(IPCAMERA)是一種結(jié)合傳統(tǒng)攝像機(jī)與網(wǎng)絡(luò)技術(shù)所產(chǎn)生的新一代攝像機(jī),它可以將影像通過(guò)網(wǎng)絡(luò)傳至地球另一端,且遠(yuǎn)端的瀏覽者不需用任何專業(yè)軟件,只要標(biāo)準(zhǔn)的網(wǎng)絡(luò)瀏覽器即可監(jiān)視其影像
    的頭像 發(fā)表于 05-27 18:06 ?1349次閱讀
    IPC網(wǎng)絡(luò)<b class='flag-5'>攝像機(jī)</b>的靜電和浪涌保護(hù)方案
    容城县| 诏安县| 台湾省| 平昌县| 千阳县| 池州市| 襄垣县| 来宾市| 诸暨市| 松溪县| 共和县| 青神县| 宜黄县| 泸州市| 交口县| 柘荣县| 平遥县| 江永县| 茌平县| 图木舒克市| 孝义市| 沅陵县| 中山市| 邛崃市| 南投市| 遵化市| 泾川县| 绍兴县| 保德县| 孝昌县| 封开县| 建德市| 常州市| 鹰潭市| 芦溪县| 得荣县| 荔浦县| 越西县| 县级市| 邵阳县| 新巴尔虎右旗|