Hi Jeff,
[email protected] schrieb am Samstag, 12. Februar 2022 um 02:07:30 UTC+1:

>
> I would greatly appreciate reports on compilation problems.  I have NOT 
> worked with the CMake files, I've only updated my local Makefile.
>

 please find attached a patch for a update of the CMake build system. It 
fixes also a compilation issue on MSVC (in line float g_d[width+1] ; -> 
constant expression expected).

A first test looks good. 

A main issue I have is that it works only with 16 bit images. I know you 
answered that questions already. But maybe after your latest optimisation 
it works better also with 8 bit images?

Thomas

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/d09bb9c3-7630-427b-8af5-a7681a136f16n%40googlegroups.com.
 CMakeLists.txt | 22 ++++++++++++++++++++++
 find_sky.c     |  3 ++-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d68c543..510588a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,12 +37,34 @@ endif()
 SET(SKYFILL_HEADER 
   mstat.h
   amoeba_06.h
+  colorspace_conversions.h
+  estimate_sky.h
+  feather_factor.h
+  find_sky.h
+  kmeans_rgb.h
+  mpfit.h
+  optimize.h
+  pixel_tests.h
+  repair_sky.h
+  sample_and_fit_sky_model.h
+  skyfill_tif.h
 )
 
 SET(SKYFILL_SOURCE
   amoeba_06.c
   mstat.c
   skyfill_tif.c
+  repair_sky.c
+  mstat.c
+  colorspace_conversions.c
+  pixel_tests.c
+  feather_factor.c
+  find_sky.c
+  estimate_sky.c
+  sample_and_fit_sky_model.c
+  optimize.c
+  kmeans_rgb.c
+  mpfit.c
 )
 
 # now create the executable
diff --git a/find_sky.c b/find_sky.c
index 8addf4d..a854667 100644
--- a/find_sky.c
+++ b/find_sky.c
@@ -1473,7 +1473,7 @@ void emboss1d(float *in, float *out, int ystart, int ymax)
 
 void bilateral_filter1d(float *in, float *out,int x,int ystart,int ymax,int 
width,float alpha,float beta)
 {
-    float g_d[width+1] ;
+    float* g_d=(float*)calloc(width+1, sizeof(float));
     for(int d=0 ; d < width+1 ; d++) {
        g_d[d] = guassian((float)d, alpha) ;
     }
@@ -1504,6 +1504,7 @@ void bilateral_filter1d(float *in, float *out,int x,int 
ystart,int ymax,int widt
 
        out[y] = new/sum_wgts ;
     }
+    free(g_d);
 }
 
 int add_to_rgb_sums(tdata_t *image, int x, int y, float *sum, float *sumsq)

Reply via email to