I just want to compile my oF project on c++14 environment. I added PROJECT_CFLAGS in config.make file in my project but it didn't worked (log says -std=c++11)
Hi, I was seraching for the best way to do particle collision. The final result should be a kinect import where particles collide with the human shape coming from kinect. I hope I can find a way to display several thousend of particles in realtime. Unfortunately I am a bit confused because there are several ways to do collisions, bullet, box2d and others. Does anyone has some hints which way I should go?
I'm doing a generative geometry setting vertex position and vertex normals. It works correctly, as you see when I open the generated mesh with mesh lab and the light is correctly calculated, if the selected view is the vertex view.
As this tube is an instance of of3DPrimitive, i can use drawNormals to debug them. But in both cases, when drawing the normals per vertex:
tube.drawNormals(2, false);
Or when drawing the normals per face
tube.drawNormals(2, true);
The normals are always pointing out in the right direction, from inside the tube to outside, it is just in meshlab that they look wrong in the "faces" view.
I think it is a problem in my code because I've downloaded a couple of meshes and I've opened them in meshlab, and they look good Is there something that I'm not taking into consideration?
the HD video is running fine in release mode, in debug mode I get around one frame per seconds. I reinstalled the k-lite stuff, the same. Where's the problem. I have seen the issue in github for a long time now.
Is there any way to reduce the lag on an HD WebCam video feed (Logitech C930e)? I'm using OF 0.9.7 on a Windows 8 and a Windows 10 machine. The lag is pretty significant at 1920x1080.
Does this have to do with the c930e having uvc h.264 encoding? Previously used the Logitech c910 with no lag at 1080p.
i've got a small newbie problem here.. i'm very new to openframeworks and c++ in general..
the basic program works quite fine already, i've got an image slideshow and on top of it there is a ofVideoGrabber instance in combination with ofxOpenCv that acts as a mask.
colorImage.setFromPixels(vidGrabber.getPixels());
grayImage = colorImage;
grayImage.brightnessContrast(brightness, contrast);
if (bLearnBakground == true) {
grayBg = grayImage;
saveBg.setFromPixels(grayImage.getPixels());
saveBg.save(bgFile, OF_IMAGE_QUALITY_BEST);
bLearnBakground = false;
}
// take the abs value of the difference between background and incoming and then threshold:
grayDiff.absDiff(grayBg, grayImage);
grayDiff.threshold(threshold);
grayDiff.blurGaussian(blur);
pixels = grayDiff.getPixels();
ofPixels lPixels = pixels.getChannel(0);
ofPixels lumPixels = maskPixels.getChannel(0);
ofPixels alpPixels = maskPixels.getChannel(1);
// masking
for (int y = 0; y < camHeight; y++) {
for (int x = 0; x < camWidth; x++) {
int idx = (y * camWidth) + x;
lumPixels[idx] = 0;
alpPixels[idx] = 255 - lPixels[idx];
}
}
// store pixels in maskPixels ofPixels
maskPixels.setChannel(0, lumPixels);
maskPixels.setChannel(1, alpPixels);
// load blurred maskPixels into ofTexture
maskTexture.loadData(maskPixels, GL_LUMINANCE_ALPHA);
but as i only need one big object being masked (and projected onto) i thought it might work better if i would use the blob function of openCv. the problem now is that i dont know how to get the shape of the blob into an ofImage (or even better an ofxGrayscaleImage) that i can handle it the same way (with blurring and masking) as i do in my code.
in this video you can see what it should look like in the end (thats an old video where the object was projected by dia-projectors infront of a black molton background). and this video shows the stage i am in at the moment. instead of the object you see me infront of my pc.. but i think you should see what i mean
Hi there, I'm looking for a video player that would support speed change dynamically. The only one I found actually is the ofxHapPlayer but it compiles only in 32 bits. ofxHapAVPlayer works well in 64bit but doesn't support continuous speed changes. (Continuous speed change meaning changing the speed without frame dropping and sound muting) Any suggestions ?
(I'm on macOS 10.11.6, El Capitan with Xcode 8.2)
edit : Just tried the ofxVLCPlayer with no more success. My video file are recorded with ffmpeg from HLS stream in H264 at 25fps with AAC 44100 for the audio encoding.
I'm trying to call a URL that I'd with this style in curl/browser:
https://username:password@website.com/api/v1/call
but I get an error with Unauthorized and a 401 back from the server, so the credentials don't appear to be passed. How can I use authentication with ofLoadURL and ofLoadURLAsync?
I swear this is something I managed to do in the past, but I can't find the sketch that I did it in. What I'm looking to do is take a plane, and effectively "cut out" shapes, allowing for sections to be fully detached. Right now I have what I need in a vertex shader, but as expected, it is not cut out, rather points are just being interpolated.
Is there a way of allowing this? To have abrupt changes in depth, that aren't interpolated?
I think maybe the best example I have is what ofZach has been doing lately on instagram:
I want to draw track so I use ofSetbackgroundaAuto(false), and l want to represent luminescence so l use ofenableblendmode(of-blend mode-add).However, that is bad result. I understand the reason, but l have no idea to represent track and luminescence.
void ofApp::setup(){
/*#define num 100↓ */
for(int i = 0; i < num; i++){
pos[i] = ofVec2f(ofRandom(ofGetWidth()),ofRandom(ofGetHeight()));
speed[i] = ofVec2f(ofRandom(-10,10),ofRandom(-10,10));
}
ofEnableBlendMode(OF_BLENDMODE_ADD);
/*to represent track*/
Hi! this had never happend before but i'm trying to convert a int to string but it returns me instead of a string a hex numer Code: ofToString(contourFindRedBlueAll.nBlobs);
I'd love to explore the concept of particles morphing and taking shape of a certain mesh. A precise example of what I'm talking about can be seen here: http://oos.moxiecode.com/js_webgl/particles_morph/
Any tips and ideas of how I could start with this or references to examples would be very much appreciated. Thanks!
I am running the particles example from /examples/math/particlesExample. I want to learn to implement a GUI to control the number of particles.
I can successfully implement a GUI and intSlider:
//ofApp.h
void numParticlesChanged(int & numParticles);
ofxIntSlider numParticles;
ofxPanel gui;
//ofApp.cpp, within void ofApp::setup(){
gui.setup();
numParticles.addListener(this, &ofApp::numParticlesChanged);
gui.add(numParticles.setup("particles", 300, 10, 1500)); //MH initial, min, max
//int num = 300;
int num = numParticles;
p.assign(num, demoParticle());
//Particles changed function
void ofApp::numParticlesChanged(int &numParticles){
//DO SOMETHING HERE
}
The problem is that the number of particles is established within the setup function, so I'm not sure how to update the number of particles within the numParticlesChanged function. I can't just call ofApp::setup() again, because it will just revert to the default number in the GUI. I've also tried p.size(numParticles) and p.assign(numParticles,demoParticle());
Hello, I've added CI testing to an addon, I do not have any problem except for the windows platform, the Environment: platform=x86, BUILDER=MSYS2 job works perfectly but these jobs:
Environment: platform=x64, BUILDER=VS, BITS=64 and Environment: platform=x86, BUILDER=VS, BITS=32
src\ofApp.cpp(66): error C2397: conversion from 'double' to 'float' requires a narrowing conversion [C:\projects\openFrameworks\addons\ofxSpaceColonization\example-ofxenvelope\example-ofxenvelope.vcxproj]