Quantcast
Channel: beginners - openFrameworks
Viewing all 4929 articles
Browse latest View live

Issues with linking in ofxGenericDmx addon

$
0
0

@ltr wrote:

Hi,

I've spent many, many hours trying to get the example projects working from the ofxGenericDmx addon. I don't want to use an IDE, just make. I've cloned the repo into the OF/addons/ dir and I've moved the examples to OF/apps/myApps/ and have tried running make. Basically, the addon is not linking to the two static libs in the libs folder.

I've tried fiddling with USER_LIBS var. I have even tried adding an addon_config.mk and adding the ADDON_PKG_CONFIG_LIBRARIES var with no luck. What do I need to change in the addon to get it to link correctly?

I'm using Ubuntu 14.04 (64bit).

Posts: 2

Participants: 2

Read full topic


How to run addon's examples without vs project files

$
0
0

@swortain wrote:

hi everyone. I'm a pretty beginner of OF, so I'm still explorer the examples....

I met some difficulties when I tried to run some addon's examples because there is no project files there.

Then I create one with VS, and copy \src from example to it, but VS say someing is wrong like this.

Posts: 9

Participants: 3

Read full topic

How to control playing the seleted animation of a model?

$
0
0

@mustconfident wrote:

I have loaded a dae type model,and the return of getAnimationCount() is 6.It means the model has 6 animation .Now I want to play someone,for example 1 index.In the touchDown(),like this:
void ofApp::touchDown(ofTouchEventArgs & touch){
model.stopAllAnimations();
model.getAnimation(1).play();
}
but it runs same with model.getAnimation(0).play();

void ofApp::touchDown(ofTouchEventArgs & touch){
model.stopAllAnimations();
model.getAnimation(0).play();
}
.So why?Is there something wrong?How to control the seleted animation of a model?

Posts: 1

Participants: 1

Read full topic

How can I make a countdown timer with pic and voice

$
0
0

@maomao wrote:

Hi there
I want to make a countdown timer to let the system begin like 3,2,1 go! with the pic of number and voice.
I have try to use the time(0) to count but it does not work well. So how can I do it.
And then when the system has begin I want to save the date for 10 sec too.

include

include

int main()
{
time_t last = time(0);
time_t next;
int pastSec = 0;

while(1)
{
if (time(&next) != last)
{ last = next;
pastSec++;
}
}

return 0;
}

Posts: 1

Participants: 1

Read full topic

Generative Art for beginners

$
0
0

@Moazam_Hussain wrote:

Hi!

I am a graphic designer and photographer and I'm really interested in generative art but i have zero coding experience. Can someone help guide me towards the right direction? Which language should i learn and what are the best tools for a beginner? Any help would be highly appreciated...

Posts: 2

Participants: 2

Read full topic

How to use rotation matrix and translation vector to correct position an assimp model?

$
0
0

@Negino wrote:

Hi,

I want to use ofxAssimpModelLoader to draw a 3d object and get something similar to this:


Image from http://www.morethantechnical.com/2012/10/17/head-pose-estimation-with-opencv-opengl-revisited-w-code/

I'm calculating rotation and translation matrix using opencv function like this:

CvMatr32f rotation = new float[9];
CvMatr32f translation = new float[3];
CvPOSITObject* posit = cvCreatePOSITObject(&pModelAnchor[0], pModelAnchor.size());
CvTermCriteria criteria = cvTermCriteria(CV_TERMCRIT_EPS | CV_TERMCRIT_ITER, 50, 1.0e-4f);
cvPOSIT(posit, &pImgAnchor[0], FOCAL_LENGTH, criteria, rotation, translation);

How can I use rotation and translation matrix to correct place the assimp model on screen and get an effect similar to the picture above?

Thank you

Posts: 1

Participants: 1

Read full topic

Cannot find -lrtaudio openframework 0.9.7 qtcreator windows 10

$
0
0

@paulinhog84 wrote:

Hi,

I am trying to get openframeworks (0.9.7) to work with Qt Creator. I have successfully compiled the 3DPrimitvesExample using msys2 console. When I try to build the same example using Qt Creato 4.1.0 I get the following error:

this is how the Build&Run configuration window looks

any advice on how to solve this issue would be greatly appreciated.

all the best,

paulo

Posts: 1

Participants: 1

Read full topic

[ error ] ofDirectShowPlayer: Cannot load video of this file type

$
0
0

@clankill3r wrote:

I have the following error while trying to play a video:

Error occured while playing or pausing or opening the file
[ error ] ofDirectShowPlayer: Cannot load video of this file type. Make sure you have codecs installed on your system. OF recommends the free K-Lite Codec pack.

I have the K-Lite Codec installed.
This is the information I get using MediaInfo (that is included with K-Lite).

General
Complete name : D:\downloads\VID_20160601_122232.mp4
Format : MPEG-4
Format profile : 3GPP Media Release 4
Codec ID : 3gp4 (isom/3gp4)
File size : 139 KiB
Duration : 2s 27ms
Overall bit rate : 560 Kbps
Encoded date : UTC 2016-06-01 10:22:35
Tagged date : UTC 2016-06-01 10:22:35

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L5.1
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1s 998ms
Source duration : 2s 17ms
Bit rate : 345 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Rotation : 270°
Frame rate mode : Variable
Frame rate : 23.298 fps
Minimum frame rate : 16.141 fps
Maximum frame rate : 24.155 fps
Original frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.016
Stream size : 85.0 KiB (61%)
Source stream size : 85.0 KiB (61%)
Title : VideoHandle
Language : English
Encoded date : UTC 2016-06-01 10:22:35
Tagged date : UTC 2016-06-01 10:22:35
mdhd_Duration : 1998

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 2s 27ms
Bit rate mode : Constant
Bit rate : 192 Kbps
Nominal bit rate : 96.0 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Frame rate : 46.875 fps (1024 spf)
Compression mode : Lossy
Stream size : 47.5 KiB (34%)
Title : SoundHandle
Language : English
Encoded date : UTC 2016-06-01 10:22:35
Tagged date : UTC 2016-06-01 10:22:35

My script is this:

void ofApp::setup(){

    movie.loadMovie("D:\downloads\VID_20160603_205751.mp4");
    movie.setLoopState(OF_LOOP_NONE);
    ofSetWindowShape(movie.getWidth(), movie.getHeight());

}

//--------------------------------------------------------------
void ofApp::update(){
    if (!movie.getIsMovieDone()) {
        movie.nextFrame();
        movie.update();
    }
    else {
        printf("done");
    }
}

//--------------------------------------------------------------
void ofApp::draw(){
    movie.draw(0, 0);
}

Here is a video in case it helps (1.6mb)

What could I do? And how can I know is OF is able to find K-Lite?
Changing the video format before loading them with OF is not an option.

Posts: 1

Participants: 1

Read full topic


How to know if the file was found?

$
0
0

@clankill3r wrote:

I am trying to load a movie like this:

movie.loadMovie("D:\downloads\VID_20160603_205751.mp4");

And i'm stuck on this error:

setupError occured while playing or pausing or opening the file
[ error ] ofDirectShowPlayer: Cannot load video of this file type. Make sure you have codecs installed on your system. OF recommends the free K-Lite Codec pack.

I have a topic about that here:

The thing is, I get the same error with an incorrect path:
movie.loadMovie("D:\some_path_that_doesnt_exist\a_non_existing_vid.mp4");

So how can I know if it is the codec or the file not being found?

Posts: 2

Participants: 2

Read full topic

Axis IP Camera Panorama

$
0
0

@lkishfy wrote:

Hey everyone,

I'm interested in stitching the feeds of multiple IP cameras (6 of them) together to create a 2D panoramic video. I've been trying to get this application to compile: https://github.com/antimodular/ofxCv_stitch to test out with webcams but I've had no such luck, thinking it may have something to do with being able to go as low as Mac OSX SDK 10.11 in Xcode 8 (this app was noted as working with OF 9 and Mac OSX 10.10

I may also be able to get this to work by placing the cameras in the correct spots with some simple trigonometry, so I could stitch multiple IP cameras together in the same frame as a video texture. Some pointers on how to stitch multiple IP cams as a video texture in the same frame with the current IP Video Grabber library could also be helpful. (@bakercp)

I'd appreciate any pointers that might help to get this to work.

Posts: 1

Participants: 1

Read full topic

Split strings from lines and get only different values (names) to new vector

$
0
0

@jbacelar wrote:

Hi.

Is there any way to split a vector (line of strings) and add only the different words to a new string (vector)?

being the result a vector of not repeated names.

Many thanks in advance.

Posts: 1

Participants: 1

Read full topic

Videoplayer audio played to different speakers (Windows VS)

$
0
0

@cherdd wrote:

Hey all,

I'm not very familiar with the audio aspect of OF and wanted to ask if anyone had any experience playing back audio to different channels? More specifically, was looking to play the audio for videos to different speakers (I suppose different channels on 1 device? Not sure if there's any other possible configuration for this.)

Even just pointing me in the direction of where I should look to try doing this could help!

Posts: 1

Participants: 1

Read full topic

Pointer Conversion

$
0
0

@BladeVV wrote:

Hi guys,

Have a very basic question. I have a kinect video feed as an unsigned char* . How do I convert that to ofTexture* ?

I've tried typecasting and it doesn't work: (ofTexture&)outputKinectFrame. Basically I need to replace the webcam feed (cam.getTextureReference()) with kinect.

Thanks much,

Posts: 1

Participants: 1

Read full topic

ofxAssimpModelLoader throwing linker errors

$
0
0

@asabanapal wrote:

So I've just created a basic project in VS2015 (Community) using the oF plugin to create the project.
I added the ofxAssimpModelLoader addon.
When I compile it's throwing 13 unresolved externals (linker errors) all related to the ofxAssimpModelLoader addon.
I haven't tried adding includes or linking libs, surely the plugin should manage this for me when adding the addon?

If i run the assimpExample from the examples it compiles, links and runs fine.

Tried it on oF 0.9.3 and 0.9.7, same issue on both.

Any ideas?

Thanks

Posts: 1

Participants: 1

Read full topic

Write an Overlay Shader

$
0
0

@BladeVV wrote:

Beginner here. Need some help writing a simple overlay shader to overlay image on top of video feed.

Here's what I have so far:

And to use the shader:

buffer.begin();
dst.draw(0, 0);
overlayShader.begin();
overlayShader.setUniformTexture("src", srcBlur, 1);
overlayShader.setUniformTexture("dst", dstBlur, 2);
dst.draw(0, 0);
overlayShader.end();
buffer.end();

What am I doing wrong? I can see the live video feed but no image on top.

Thanks much,

Posts: 1

Participants: 1

Read full topic


ofxMaxim - occasional runtime errors

$
0
0

@dcb wrote:

Hi,

I started implementing the examples of Leon Fedden's ofxMaxim tutorial series in oF 0.9.3. The code for the first two examples is in my ofxMaxim-examples repository.

In both examples I'm getting occasional runtime errors like this: Thread 1: EXC_BAD_ACCESS (code=EXC_i386_GPFLT) or Thread 1: EXC_BAD_INSTRUCTION (code=EXC_i386_INVOP, subcode 0x0). In almost all cases these errors occur in the ofAppGLFWWindow::update() method when this line is executed: glfwShowWindow(windowP);.

Since both errors seem to relate to the access of released objects, I'm assuming I'm doing something fundamentally wrong. On the other hand, these errors do not occur every time, though pretty often, when I run the examples, which makes me think this could also be either a bug in the addon or a bug related to my system – I'm running Mac OS X 10.10.5 on a Mid2010 MacBook Pro.

Any ideas how to fix this?

Thanks.
David

Posts: 1

Participants: 1

Read full topic

Changing OF Window z-position (Windows)

$
0
0

@Regi wrote:

Is it possible to assign a 'device context handle' obtained by means of GetDC to an OF window? Thus changing it's z-depth position? ::SetWindowPos doesn't seem to do the trick in this case for some reason, even though setting it to top-most level (HWND_TOPMOST) does work, so perhaps the HDC is not something I should be using in the call?

Thanks!

Posts: 1

Participants: 1

Read full topic

Makefiles mix spaces and tabs

$
0
0

@Emigre wrote:

OF Makefiles have spaces in it as you can see in this line, mixed with the tabs. I was under the impression that only tabs should be used in a Makefile.

I've thought that maybe there was a reason for this and it would probably be better to ask here.

Thanks!

Posts: 1

Participants: 1

Read full topic

OF + NW.js - Mesh or Bezier Warping

$
0
0

@rrpadgett wrote:

Hello friends,

We have built an application with NW.js and need to be able to projection map the application onto a curved wall. We need mesh or bezier warping capabilities and I see that OF may be a solution for that.

We are running the application on an Intel NUC Skull Canyon with Ubuntu 14.04. This is for a permanent install and needs to run stable 24/7. I see the addons ofxBezierWarp and ofxMeshWarp and thought those might be our solutions but we are having trouble getting it to compile properly on our system.

Does anyone have experience with these or have any suggestions? It would be much appreciated. Thanks!

Posts: 1

Participants: 1

Read full topic

Redraw window contents during window resize

$
0
0

@BlueFang wrote:

I am evaluating Ofx and Cinder as possible frameworks for a migration of an already existing cross platform application.

I went through the tutorial "Basics of Generating Meshes from an Image" tutorial - which seems to give a great overview of the pipeline I would be using: basically a list of vertices in an ofMesh or ofVboMesh that would be drawn as either points or lines - no shader stuff, no normals - just vertices, lines and points (for now).

Whenever I drag to resize the app window, it turns white during the drag - and redraws itself once the drag has finished (so far all of my testing has been on OS X - so not sure if Windows does the same thing).

I have noticed many of the example apps behave the same way. Am I missing a simple configuration parameter to make it so the window is updated during the resize? Is this possible?

A second but less important issue is that it seems the Of 3D coordinate system is mapped to the window size - this seems like a really bad idea. Shouldn't the coordinate system be normalized so that no matter what the size of the window, the render will be scaled correctly?

Note: Most of the basic Cinder examples have flawlessly smooth window resizing.

Posts: 3

Participants: 2

Read full topic

Viewing all 4929 articles
Browse latest View live