It is currently Sat Aug 22, 2020 1:34 pm


All times are UTC




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: using LowPassFilter
PostPosted: Thu Nov 01, 2012 3:09 pm 

Joined: Mon Oct 15, 2012 4:33 pm
Posts: 52
i have made an example (see the attached file: polyvox.zip) based on Basic Example with Qt , you can put the LowPassFilterExample folder in the Example folder in your polyvox root folder using the CMakeLists.txt file to compile the example . The code is the same as i used inside OpenFrameworks, with the same result. I forgot to mention i 'm using the version from gitorius, maybe it is different from last snapshot (11th December 2011 )...


Attachments:
polyvox.zip [174.1 KiB]
Downloaded 232 times
Top
Offline Profile  
Reply with quote  
 Post subject: Re: using LowPassFilter
PostPosted: Fri Nov 02, 2012 9:23 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
I had a look at your code. I'm not sure I was seeing exactly the same things as you but I agree there was some strange and unexpected behaviour. But actually I know what's going on, as I made some improvments to the LowPassFilter a few weeks ago and it looks like you don't have them.

Basically the LowPassFilter computes an average of the voxels, and to do this it needs to add up the values and then divide by the number of voxels. The problem is, if you store your data as Density8 then this type is also used for adding up the values and it very quickly goes out of range.

In the latest version in Git (try the develop branch rather than master) you can specify an AccumulationType (look at the unit test again). If you use Density16 for this you should find things work better.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: using LowPassFilter
PostPosted: Fri Nov 02, 2012 9:34 pm 

Joined: Mon Oct 15, 2012 4:33 pm
Posts: 52
Quote:
In the latest version in Git (try the develop branch rather than master) you can specify an AccumulationType (look at the unit test again). If you use Density16 for this you should find things work better.


i downloaded the develop branch but not sure of understand: What is an Accumulation Type? i tried my example again and modified with Density16 but nothing change with .execute() ( vertices = 0) instead with .executeSAT() works very well.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: using LowPassFilter
PostPosted: Sat Nov 03, 2012 8:34 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
I just tried the following steps:

1) Get latest PolyVox from develop.
2) Added the LowPassFilterExample you provided in the zip file above. It doesn't build because of the new AccumulationType, so you ned to change this line:

Code:
LowPassFilter< SimpleVolume<Density8>, SimpleVolume<Density8> > pass1(&volData, reg, &resultVolume, reg,    kernelSize);


to
Code:
LowPassFilter< SimpleVolume<Density8>, SimpleVolume<Density8>, Density16 > pass1(&volData, reg, &resultVolume, reg,    kernelSize);


Note that the volumes are still of type Density8 and other lines in the example don't have to change. But now we are telling the LowPassFilter to use the Density16 type when adding up the values.

3) After doing this, it seems to work with either execute() or executeSAT() (though the results are slightly different).

Let me know if you still can't get it to work.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: using LowPassFilter
PostPosted: Sat Nov 03, 2012 12:19 pm 

Joined: Mon Oct 15, 2012 4:33 pm
Posts: 52
Thanks David for the explanation but i have a problem with git , i can't grab the develop branch nor i can't download the .tar file, everytime i download it, it is corrupted.
i used this
Code:
 git clone git://gitorious.org/polyvox/polyvox.git polyvox/polyvox:develop

but i can't see the new version LowPassFilter.h as you described (and i can see http://www.gitorious.org/polyvox/polyvo ... ssFilter.h )

i'm doing something wrong or what?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: using LowPassFilter
PostPosted: Sat Nov 03, 2012 2:22 pm 
Developer
User avatar

Joined: Sun May 11, 2008 4:29 pm
Posts: 198
Location: UK
Once you've cloned the repo, you have to call
Code:
git checkout develop
inside it.

_________________
Matt Williams
Linux/CMake guy


Top
Offline Profile  
Reply with quote  
 Post subject: Re: using LowPassFilter
PostPosted: Sat Nov 03, 2012 4:21 pm 

Joined: Mon Oct 15, 2012 4:33 pm
Posts: 52
I finally managed to download the develop branch and to use the function. execute ()! :D
Thank you for your time and help that you gave me.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: using LowPassFilter
PostPosted: Sat Nov 03, 2012 7:23 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Great, I'm glad it all came together :-)


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net