====== Informatique et réseau ======
* Référant(s) : ...
* Classe(s) : ...
===== Principe de fonctionnement =====
{{:projets:infini:info-reseau:8-techniques-legendes.png|}}
{{:projets:infini:info-reseau:infini-techniques-superviseur.svg.png?800|}}
===== Messages =====
==== Ordinateur > ENG ====
"id on speed pan tilt reserved"
id : "A" ou "B" pour les robots
on : caractère 30 pour on, 31 pour off
speed :
pan :
tilt :
reserved : on ajoute un caractère pour un besoin futur
==== ENG > Ordinateur ====
"id tension inclinaison vitesseDeRotation choc reserved"
id : "A" ou "B" pour les robots
tension :
inclinaison :
vitesseDeRotation :
choc : caractère 30 si un choc, 31 si aucun
reserved : on ajoute un caractère pour un besoin futur
===== Comportements =====
{{:projets:infini:info-reseau:eng-comportements.jpg?800|}}
===== Code Web =====
====mars 2016 (stéphane)====
* https://twitter.com/afpfr
* https://twitter.com/BFMTV
* https://twitter.com/franceinfo
* https://twitter.com/le_Parisien
++++ Code Processing |
import java.util.regex.Matcher;
import java.util.regex.Pattern;
StringList tweetsAff = new StringList();
int yAffDebut = 14;
void setup() {
size(800, 600);
PFont f = createFont("ArialUnicodeMS", 24);
textFont(f);
textAlign (LEFT, LEFT);
textSize(12);
fill(0);
nouveauxTweets();
String[] aEnregistrer = new String[tweetsAff.size()];
for (int i = 0; i
++++
===== Rendu Vidéo =====
{{:projets:infini:8-ecran.jpg?400|}}
==== Ip vidéo 08/04/16 ====
Récupérer la vidéo du téléphone (application IPWebcam) avec OpenFrameworks : {{:projets:infini:info-reseau:video-ip-ofxcv.zip|}}.
Télécharger [[https://github.com/kylemcdonald/ofxCv/archive/master.zip|ofxCv.zip]] et le placer dans le répertoire "./addons/".
#pragma once
#include "ofMain.h"
#include "ofxCv.h"
#include
#include
#include
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void mouseEntered(int x, int y);
void mouseExited(int x, int y);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
cv::VideoCapture vcap;
cv::Mat mat;
ofImage img;
};
#include "ofApp.h"
void ofApp::setup(){
// IP Address
// You must add the "something.mjpeg" at the end of the IP address
// because OpenCv returns errors as it does not find the format ...
// See : http://code.opencv.org/issues/2474
vcap.open("http://192.168.1.101:8080/video?something.mjpeg");
img.allocate(640, 480, OF_IMAGE_COLOR);
}
void ofApp::update(){
vcap.read(mat);
ofxCv::toOf(mat, img);
img.update();
}
void ofApp::draw(){
img.draw(0,0);
}
....
....
....