fulguro-devel Mailing List for fulguro (Page 2)
Status: Beta
Brought to you by:
impchris
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(496) |
Dec
(110) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(267) |
Feb
(379) |
Mar
(158) |
Apr
(181) |
May
(9) |
Jun
(45) |
Jul
(75) |
Aug
(4) |
Sep
(11) |
Oct
(1) |
Nov
(29) |
Dec
|
From: impchris <imp...@us...> - 2008-11-05 21:01:45
|
Update of /cvsroot/fulguro/fulguro/src/morpho In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5131/src/morpho Modified Files: flgrMorphoKerOp.c Log Message: Index: flgrMorphoKerOp.c =================================================================== RCS file: /cvsroot/fulguro/fulguro/src/morpho/flgrMorphoKerOp.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** flgrMorphoKerOp.c 26 Jun 2008 21:02:51 -0000 1.15 --- flgrMorphoKerOp.c 5 Nov 2008 21:01:39 -0000 1.16 *************** *** 339,360 **** list_nhb_val = (dtype *) extr->list_nhb_val[k]; \ \ - flgr_set_array_##dtype(presult,k,0); \ - \ stop = 0; \ for(i=0 ; i<size[k] ; i++){ \ ! if(list_nhb_val[i]==1) { \ ! if(list_data_val[i] <= 0) { \ ! stop=1; \ ! break; \ ! } \ ! }else { \ ! if(list_data_val[i] != 0) { \ ! stop=1; \ ! break; \ ! } \ } \ } \ \ ! val = (stop==0) ? MAX_##dtype : flgr_get_array_##dtype(presult,k); \ flgr_set_array_##dtype(presult,k,val); \ \ --- 339,353 ---- list_nhb_val = (dtype *) extr->list_nhb_val[k]; \ \ stop = 0; \ for(i=0 ; i<size[k] ; i++){ \ ! if((list_nhb_val[i]==2) && (list_data_val[i]==0)) { \ ! stop=1;break; \ ! } \ ! if((list_nhb_val[i]==1) && (list_data_val[i]!=0)) { \ ! stop=1;break; \ } \ } \ \ ! val = (stop==0) ? MAX_##dtype : 0 ; \ flgr_set_array_##dtype(presult,k,val); \ \ *************** *** 428,448 **** \ flgr_vector_get_element_##dtype(center_vec, k, &val); \ ! flgr_set_array_##dtype(presult,k,val); \ ! \ stop = 0; \ for(i=0 ; i<size[k] ; i++){ \ ! if(list_nhb_val[i]==1) { \ ! if(list_data_val[i] <= 0) { \ ! stop=1; \ ! break; \ ! } \ ! }else { \ ! if(list_data_val[i] != 0) { \ ! stop=1; \ ! break; \ ! } \ } \ } \ ! val = (stop==0) ? 0 : flgr_get_array_##dtype(presult,k); \ flgr_set_array_##dtype(presult,k,val); \ \ --- 421,435 ---- \ flgr_vector_get_element_##dtype(center_vec, k, &val); \ ! \ stop = 0; \ for(i=0 ; i<size[k] ; i++){ \ ! if((list_nhb_val[i]==2) && (list_data_val[i]==0)) { \ ! stop=1;break; \ ! } \ ! if((list_nhb_val[i]==1) && (list_data_val[i]!=0)) { \ ! stop=1;break; \ } \ } \ ! val = (stop==0) ? 0 : val ; \ flgr_set_array_##dtype(presult,k,val); \ \ *************** *** 520,541 **** \ flgr_vector_get_element_##dtype(center_vec, k, &val); \ - flgr_set_array_##dtype(presult,k,val); \ \ stop = 0; \ for(i=0 ; i<size[k] ; i++){ \ ! if(list_nhb_val[i]==1) { \ ! if(list_data_val[i] <= 0) { \ ! stop=1; \ ! break; \ ! } \ ! }else { \ ! if(list_data_val[i] != 0) { \ ! stop=1; \ ! break; \ ! } \ } \ } \ \ ! val = (stop==0) ? MAX_##dtype : flgr_get_array_##dtype(presult,k); \ flgr_set_array_##dtype(presult,k,val); \ \ --- 507,522 ---- \ flgr_vector_get_element_##dtype(center_vec, k, &val); \ \ stop = 0; \ for(i=0 ; i<size[k] ; i++){ \ ! if((list_nhb_val[i]==2) && (list_data_val[i]==0)) { \ ! stop=1;break; \ ! } \ ! if((list_nhb_val[i]==1) && (list_data_val[i]!=0)) { \ ! stop=1;break; \ } \ } \ \ ! val = (stop==0) ? MAX_##dtype : val; \ flgr_set_array_##dtype(presult,k,val); \ \ |
From: impchris <imp...@us...> - 2008-11-05 20:09:51
|
Update of /cvsroot/fulguro/fulguro/swig/morpho In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18516/swig/morpho Modified Files: flgrmorpho.i Log Message: Updated Golay SE creation Index: flgrmorpho.i =================================================================== RCS file: /cvsroot/fulguro/fulguro/swig/morpho/flgrmorpho.i,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** flgrmorpho.i 8 Jul 2008 07:10:12 -0000 1.46 --- flgrmorpho.i 5 Nov 2008 20:09:25 -0000 1.47 *************** *** 44,47 **** --- 44,48 ---- #include <flgrMorphoWatershed.h> #include <flgrMorphoSkiz.h> + #include <flgrMorphoGolay.h> %} *************** *** 1030,1033 **** --- 1031,1051 ---- + + typedef struct{ + %immutable; + FLGR_Data2D **se; + int nbse; + %mutable; + }FLGR_Golay; + + + + FLGR_Golay* flgr2d_create_golay(char *letter, FLGR_Type type, FLGR_Connexity connexity); + + void flgr2d_destroy_golay(FLGR_Golay* gl); + + + + %nocallback; |
From: impchris <imp...@us...> - 2008-11-05 20:09:29
|
Update of /cvsroot/fulguro/fulguro/src/morpho In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18516/src/morpho Modified Files: flgrMorphoGolay.c flgrMorphoGolay.h Log Message: Updated Golay SE creation Index: flgrMorphoGolay.c =================================================================== RCS file: /cvsroot/fulguro/fulguro/src/morpho/flgrMorphoGolay.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** flgrMorphoGolay.c 26 Mar 2008 20:53:51 -0000 1.19 --- flgrMorphoGolay.c 5 Nov 2008 20:09:25 -0000 1.20 *************** *** 25,30 **** --- 25,32 ---- #include <flgrCoreData.h> #include <flgrCoreCopy.h> + #include <flgrCoreMalloc.h> #include <flgrCoreNhbManage.h> #include <flgrCoreDispatch.h> + #include <flgrCoreTypes.h> #include "flgrMorphoGolay.h" *************** [...1452 lines suppressed...] } *************** *** 1502,1504 **** --- 1518,1533 ---- + void flgr2d_destroy_golay(FLGR_Golay* gl) { + int i; + + for(i=0 ; i<gl->nbse ; i++) { + flgr2d_destroy(gl->se[i]); + } + + flgr_free(gl->se); + + } + + + //! @} Index: flgrMorphoGolay.h =================================================================== RCS file: /cvsroot/fulguro/fulguro/src/morpho/flgrMorphoGolay.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** flgrMorphoGolay.h 14 Feb 2008 15:13:48 -0000 1.6 --- flgrMorphoGolay.h 5 Nov 2008 20:09:25 -0000 1.7 *************** *** 31,37 **** ! EXPORT_LIB int flgr2d_fill_nhb_golay(FLGR_Data2D *nhbArray, char *letter); --- 31,43 ---- ! typedef struct{ ! FLGR_Data2D **se; ! int nbse; ! }FLGR_Golay; + EXPORT_LIB FLGR_Golay* flgr2d_create_golay(char *letter, FLGR_Type type, FLGR_Connexity connexity); + EXPORT_LIB void flgr2d_destroy_golay(FLGR_Golay* gl); + |
From: impchris <imp...@us...> - 2008-11-04 21:02:52
|
Update of /cvsroot/fulguro/fulguro/apps/python/example5 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11384 Modified Files: example5.py Log Message: Index: example5.py =================================================================== RCS file: /cvsroot/fulguro/fulguro/apps/python/example5/example5.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** example5.py 27 Sep 2008 19:28:06 -0000 1.24 --- example5.py 4 Nov 2008 21:02:46 -0000 1.25 *************** *** 78,82 **** flgr2d_arith_add(imtemp2,imw2,1) ! flgr2d_replace(imw1, imtemp1, ">=", 2, imtemp2, imw1) vol1 = flgr2d_measure_volume(imw1)[0] --- 78,83 ---- flgr2d_arith_add(imtemp2,imw2,1) ! #flgr2d_replace(imw1, imtemp1, ">=", 2, imtemp2, imw1) ! flgr2d_arith_inf(imw1,imtemp2,imw1) vol1 = flgr2d_measure_volume(imw1)[0] |
From: impchris <imp...@us...> - 2008-10-07 19:15:52
|
Update of /cvsroot/fulguro/fulguro/apps/python/example7 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10829/apps/python/example7 Modified Files: example7.py Log Message: Index: example7.py =================================================================== RCS file: /cvsroot/fulguro/fulguro/apps/python/example7/example7.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** example7.py 3 Jul 2008 13:49:42 -0000 1.13 --- example7.py 7 Oct 2008 19:15:37 -0000 1.14 *************** *** 9,16 **** from fulguro.flgrrtcapture import * cam0 = FLGR_RtCapture2D("/dev/video0") ! cam0.set_palette("YUV420P") ! cam0.set_size(320,240) ! size_x, size_y = cam0.get_size() imin = FLGR_Data2D(size_y,size_x,1,FLGR_UINT8) --- 9,18 ---- from fulguro.flgrrtcapture import * + size_x = 640 + size_y = 480 + cam0 = FLGR_RtCapture2D("/dev/video0") ! cam0.set_palette("YV12") ! cam0.set_size(size_x,size_y) imin = FLGR_Data2D(size_y,size_x,1,FLGR_UINT8) |
From: impchris <imp...@us...> - 2008-09-28 12:53:14
|
Update of /cvsroot/fulguro/fulguro/apps/c/example2 In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv21927/apps/c/example2 Modified Files: Makefile example2.c Log Message: Applications update Index: Makefile =================================================================== RCS file: /cvsroot/fulguro/fulguro/apps/c/example2/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 20 Oct 2007 12:51:08 -0000 1.1 --- Makefile 28 Sep 2008 12:53:02 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- ############### CUSTOM ################## + CC = gcc EXE = example2 LIBPATH = ../../../lib Index: example2.c =================================================================== RCS file: /cvsroot/fulguro/fulguro/apps/c/example2/example2.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** example2.c 15 Apr 2008 08:10:23 -0000 1.24 --- example2.c 28 Sep 2008 12:53:02 -0000 1.25 *************** *** 20,34 **** #include <time.h> ! #define BENCH_FUCTION(nbtime,textinfo,function,...) \ { \ ! clock_t before, after; \ int i; \ ! before=clock(); \ for(i=0;i<nbtime;i++) { \ function(__VA_ARGS__); \ } \ ! after=clock(); \ ! printf(textinfo " time : %d us \n", \ ! (int) ((after - before)/(CLOCKS_PER_SEC/1000000)/nbtime)); \ } --- 20,42 ---- #include <time.h> ! #define BENCH_FUNCTION(nbtime,textinfo,function,...) \ { \ ! time_t before_t, after_t; \ ! clock_t before_c, after_c; \ int i; \ ! \ ! before_t = time(NULL); \ ! before_c = clock(); \ ! \ for(i=0;i<nbtime;i++) { \ function(__VA_ARGS__); \ } \ ! \ ! after_t = time(NULL); \ ! after_c = clock(); \ ! \ ! printf(textinfo " System time : %d us, CPU time : %d us \n", \ ! (int) (((after_t-before_t)*1000000)/nbtime), \ ! (int) ((after_c-before_c)/(CLOCKS_PER_SEC/1000000)/nbtime)); \ } *************** *** 155,165 **** FLGR_Data2D *imDest2; FLGR_Data2D *imDest3; FLGR_Data2D *nhb; ! imin = flgr2d_load_pgm("../../images/gray/cameraman.pgm"); imDest1 = flgr2d_create_pixmap_from(imin); imDest2 = flgr2d_create_pixmap_from(imin); imDest3 = flgr2d_create_pixmap_from(imin); nhb = flgr2d_create_neighborhood(9,9,1,FLGR_UINT8,FLGR_HEX,FLGR_6_CONNEX); --- 163,178 ---- FLGR_Data2D *imDest2; FLGR_Data2D *imDest3; + FLGR_Data2D *imDest4; FLGR_Data2D *nhb; + FLGR_Data2D *nhb2; ! imin = flgr2d_load_pgm("../../images/gray/lena.pgm"); ! //imin = flgr2d_create_pixmap(256,1024,1,FLGR_UINT8); imDest1 = flgr2d_create_pixmap_from(imin); imDest2 = flgr2d_create_pixmap_from(imin); imDest3 = flgr2d_create_pixmap_from(imin); + imDest4 = flgr2d_create_pixmap_from(imin); nhb = flgr2d_create_neighborhood(9,9,1,FLGR_UINT8,FLGR_HEX,FLGR_6_CONNEX); + nhb2 = flgr2d_create_neighborhood_from_connexity(1,FLGR_UINT8,FLGR_8_CONNEX); *************** *** 168,178 **** flgr2d_copy(imDest3,imDest1); ! BENCH_FUCTION(10,"Fast Dual Geodesic reconstruction", flgr2d_geodesic_reconstruct_dual,imDest1,imin,nhb->connexity); ! BENCH_FUCTION(10,"Fast Geodesic reconstruction by closing", flgr2d_geodesic_reconstruct_erode,imDest2,imin,nhb->connexity); ! BENCH_FUCTION(10,"Naive Geodesic reconstruction by closing", geodesic_rec_erode,imDest3,imin,nhb); --- 181,193 ---- flgr2d_copy(imDest3,imDest1); ! BENCH_FUNCTION(100000,"Erode 3x3 benchmark", flgr2d_erode,imDest4,imin,nhb2); ! ! BENCH_FUNCTION(100,"Fast Dual Geodesic reconstruction", flgr2d_geodesic_reconstruct_dual,imDest1,imin,nhb->connexity); ! BENCH_FUNCTION(100,"Fast Geodesic reconstruction by closing", flgr2d_geodesic_reconstruct_erode,imDest2,imin,nhb->connexity); ! BENCH_FUNCTION(100,"Naive Geodesic reconstruction by closing", geodesic_rec_erode,imDest3,imin,nhb); *************** *** 185,189 **** --- 200,206 ---- flgr2d_destroy(imDest2); flgr2d_destroy(imDest3); + flgr2d_destroy(imDest4); flgr2d_destroy(nhb); + flgr2d_destroy(nhb2); } |
From: impchris <imp...@us...> - 2008-09-27 19:41:26
|
Update of /cvsroot/fulguro/fulguro/src/arith In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv27448/src/arith Modified Files: flgrArithShiftFast.c Log Message: Index: flgrArithShiftFast.c =================================================================== RCS file: /cvsroot/fulguro/fulguro/src/arith/flgrArithShiftFast.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** flgrArithShiftFast.c 27 Sep 2008 19:40:37 -0000 1.9 --- flgrArithShiftFast.c 27 Sep 2008 19:41:21 -0000 1.10 *************** *** 619,627 **** void flgr1d_arith_sup_shift_left_fast_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, int left_shift_size) { #ifdef __SSE2__ ! if((left_shift_size==1)&&(datdest->spp==1)) { ! FLGR_MACRO_1D_ARITH_OP_SHIFT_1_LEFT_SSE2(fgUINT8, __m128i, flgr_defop_sup_fgUINT8, _mm_max_epu8); ! }else{ FLGR_MACRO_1D_ARITH_OP_SHIFT_LEFT_SSE2(fgUINT8, __m128i, flgr_defop_sup_fgUINT8, _mm_max_epu8); ! } #else #if defined(__MMX__) && defined(__SSE__) --- 619,627 ---- void flgr1d_arith_sup_shift_left_fast_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, int left_shift_size) { #ifdef __SSE2__ ! /* if((left_shift_size==1)&&(datdest->spp==1)) { */ ! /* FLGR_MACRO_1D_ARITH_OP_SHIFT_1_LEFT_SSE2(fgUINT8, __m128i, flgr_defop_sup_fgUINT8, _mm_max_epu8); */ ! /* }else{ */ FLGR_MACRO_1D_ARITH_OP_SHIFT_LEFT_SSE2(fgUINT8, __m128i, flgr_defop_sup_fgUINT8, _mm_max_epu8); ! /* } */ #else #if defined(__MMX__) && defined(__SSE__) *************** *** 731,739 **** void flgr1d_arith_inf_shift_left_fast_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, int left_shift_size) { #ifdef __SSE2__ ! if((left_shift_size==1)&&(datdest->spp==1)) { ! FLGR_MACRO_1D_ARITH_OP_SHIFT_1_LEFT_SSE2(fgUINT8, __m128i, flgr_defop_inf_fgUINT8, _mm_min_epu8); ! }else{ FLGR_MACRO_1D_ARITH_OP_SHIFT_LEFT_SSE2(fgUINT8, __m128i, flgr_defop_inf_fgUINT8, _mm_min_epu8); ! } #else #if defined(__MMX__) && defined(__SSE__) --- 731,739 ---- void flgr1d_arith_inf_shift_left_fast_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, int left_shift_size) { #ifdef __SSE2__ ! /* if((left_shift_size==1)&&(datdest->spp==1)) { */ ! /* FLGR_MACRO_1D_ARITH_OP_SHIFT_1_LEFT_SSE2(fgUINT8, __m128i, flgr_defop_inf_fgUINT8, _mm_min_epu8); */ ! /* }else{ */ FLGR_MACRO_1D_ARITH_OP_SHIFT_LEFT_SSE2(fgUINT8, __m128i, flgr_defop_inf_fgUINT8, _mm_min_epu8); ! /* } */ #else #if defined(__MMX__) && defined(__SSE__) |
From: impchris <imp...@us...> - 2008-09-27 19:40:46
|
Update of /cvsroot/fulguro/fulguro/src/arith In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv27058/src/arith Modified Files: flgrArithShiftFast.c Log Message: Index: flgrArithShiftFast.c =================================================================== RCS file: /cvsroot/fulguro/fulguro/src/arith/flgrArithShiftFast.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** flgrArithShiftFast.c 27 Sep 2008 19:28:06 -0000 1.8 --- flgrArithShiftFast.c 27 Sep 2008 19:40:37 -0000 1.9 *************** *** 427,430 **** --- 427,477 ---- + #define FLGR_MACRO_1D_ARITH_OP_SHIFT_1_LEFT_SSE2(dtype,vtype, \ + scalar_instr, \ + vector_instr) \ + const int spp = datdest->spp; \ + const int length = datdest->length*spp; \ + const int vec_length = sizeof(vtype)/sizeof(dtype); \ + dtype *psrc = (dtype*) data1->array; \ + dtype *pdest = (dtype*) datdest->array; \ + dtype sca1; \ + dtype sca2; \ + vtype *vec_src; \ + vtype *vec_dest; \ + vtype vec1; \ + vtype vec2; \ + int j; \ + \ + FLGR_DECLARE_FUNCTION; \ + \ + vec_src = (vtype*) (psrc); \ + vec_dest = (vtype*) (pdest); \ + \ + for(j=0 ; j<length-vec_length ; j+=vec_length,vec_src++,vec_dest++) { \ + vec1 = _mm_load_si128(vec_src); \ + vec2 = _mm_srli_si128(vec1,1); \ + vec1 = vector_instr(vec1,vec2); \ + _mm_store_si128(vec_dest,vec1); \ + \ + sca1 = flgr_get_array_##dtype(psrc,j+vec_length-1); \ + sca2 = flgr_get_array_##dtype(psrc,j+vec_length); \ + sca1 = scalar_instr(sca1,sca2); \ + flgr_set_array_##dtype(pdest,j+vec_length-1,sca1); \ + } \ + \ + j=length-vec_length; \ + \ + vec1 = _mm_load_si128(vec_src); \ + vec2 = _mm_srli_si128(vec1,1); \ + vec1 = vector_instr(vec1,vec2); \ + _mm_store_si128(vec_dest,vec1); \ + sca1 = flgr_get_array_##dtype(psrc,j+vec_length-1); \ + flgr_set_array_##dtype(pdest,j+vec_length-1,sca1); \ + \ + return + + + + *************** *** 507,510 **** --- 554,560 ---- + + + void flgr1d_arith_sup_shift_1_right_fast_fgBIT(FLGR_Data1D *datdest, FLGR_Data1D *data1) { FLGR_MACRO_1D_ARITH_OP_SHIFT_RIGHT_BIT(or,0); *************** *** 569,573 **** --- 619,627 ---- void flgr1d_arith_sup_shift_left_fast_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, int left_shift_size) { #ifdef __SSE2__ + if((left_shift_size==1)&&(datdest->spp==1)) { + FLGR_MACRO_1D_ARITH_OP_SHIFT_1_LEFT_SSE2(fgUINT8, __m128i, flgr_defop_sup_fgUINT8, _mm_max_epu8); + }else{ FLGR_MACRO_1D_ARITH_OP_SHIFT_LEFT_SSE2(fgUINT8, __m128i, flgr_defop_sup_fgUINT8, _mm_max_epu8); + } #else #if defined(__MMX__) && defined(__SSE__) *************** *** 677,681 **** void flgr1d_arith_inf_shift_left_fast_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, int left_shift_size) { #ifdef __SSE2__ ! FLGR_MACRO_1D_ARITH_OP_SHIFT_LEFT_SSE2(fgUINT8, __m128i, flgr_defop_inf_fgUINT8, _mm_min_epu8); #else #if defined(__MMX__) && defined(__SSE__) --- 731,739 ---- void flgr1d_arith_inf_shift_left_fast_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *data1, int left_shift_size) { #ifdef __SSE2__ ! if((left_shift_size==1)&&(datdest->spp==1)) { ! FLGR_MACRO_1D_ARITH_OP_SHIFT_1_LEFT_SSE2(fgUINT8, __m128i, flgr_defop_inf_fgUINT8, _mm_min_epu8); ! }else{ ! FLGR_MACRO_1D_ARITH_OP_SHIFT_LEFT_SSE2(fgUINT8, __m128i, flgr_defop_inf_fgUINT8, _mm_min_epu8); ! } #else #if defined(__MMX__) && defined(__SSE__) |
From: impchris <imp...@us...> - 2008-09-27 19:28:19
|
Update of /cvsroot/fulguro/fulguro/apps/python/example5 In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv21861/apps/python/example5 Modified Files: example5.py Log Message: small speed improvements Index: example5.py =================================================================== RCS file: /cvsroot/fulguro/fulguro/apps/python/example5/example5.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** example5.py 3 Apr 2008 11:11:40 -0000 1.23 --- example5.py 27 Sep 2008 19:28:06 -0000 1.24 *************** *** 8,14 **** - import os - import sys - import time from fulguro import * --- 8,11 ---- *************** *** 16,19 **** --- 13,17 ---- ### PROCEDURES ######################################################### def benchmark(function,nbiter,*args): + import time t=time.time() for i in range(nbiter): *************** *** 54,59 **** vol1 = flgr2d_measure_volume(imw1)[0] ! ! flgr2d_replace(im_indicatrice, im_indicatrice, "==", i, 0, im_indicatrice) --- 52,57 ---- vol1 = flgr2d_measure_volume(imw1)[0] ! #print i ! #flgr2d_replace(im_indicatrice, im_indicatrice, "==", i, 0, im_indicatrice) *************** *** 91,95 **** ################################################################## ! imin = flgr2d_load_pgm('../../images/gray/goldhill.pgm') imqdist1 = FLGR_Data2D(imin) imresidu = FLGR_Data2D(imin) --- 89,93 ---- ################################################################## ! imin = flgr2d_load_pgm('../../images/gray/cameraman.pgm') imqdist1 = FLGR_Data2D(imin) imresidu = FLGR_Data2D(imin) *************** *** 97,113 **** ! flgr2d_arith_invert(imin,imin) ! print "Quasi distance time : ",benchmark(quasiDistance,10,imqdist1,imresidu,imin,FLGR_8_CONNEX),"ms" ! print "Descente time : ",benchmark(descente,10,imqdist2,imqdist1,FLGR_8_CONNEX),"ms" ! flgr2d_save_pgm(imqdist1,"quasidistance_perche_fulguro.pgm") ! flgr2d_save_pgm(imqdist2,"quasidistance_fulguro.pgm") ! flgr2d_save_pgm(imresidu,"quasidistance_residu_fulguro.pgm") flgr_display(imin,"imin", ! imqdist2,'quasidistance.pgm', ! imresidu,'residu.pgm') --- 95,111 ---- ! #flgr2d_arith_invert(imin,imin) ! print "Quasi distance time : ",benchmark(quasiDistance,20,imqdist1,imresidu,imin,FLGR_8_CONNEX),"ms" ! print "Descente time : ",benchmark(descente,20,imqdist2,imqdist1,FLGR_8_CONNEX),"ms" ! flgr2d_save_pgm(imqdist1,"quasidistance_perche_fulguro") ! flgr2d_save_pgm(imqdist2,"quasidistance_fulguro") ! flgr2d_save_pgm(imresidu,"quasidistance_residu_fulguro") flgr_display(imin,"imin", ! imqdist2,'quasidistance', ! imresidu,'residu') |
From: impchris <imp...@us...> - 2008-09-27 19:28:16
|
Update of /cvsroot/fulguro/fulguro/apps/python/example2 In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv21861/apps/python/example2 Modified Files: example2.py Log Message: small speed improvements Index: example2.py =================================================================== RCS file: /cvsroot/fulguro/fulguro/apps/python/example2/example2.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** example2.py 23 Sep 2008 07:22:52 -0000 1.33 --- example2.py 27 Sep 2008 19:28:05 -0000 1.34 *************** *** 60,64 **** while not(imtmp == immarker): flgr2d_copy(imtmp,immarker) ! flgr2d_geodesic_erode_8_connexity(immarker, immask) --- 60,64 ---- while not(imtmp == immarker): flgr2d_copy(imtmp,immarker) ! flgr2d_geodesic_dilate_8_connexity(immarker, immask) |
From: impchris <imp...@us...> - 2008-09-02 08:46:59
|
Update of /cvsroot/fulguro/fulguro/src/rtcapture In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv24432/src/rtcapture Modified Files: flgrRtCapture.c Log Message: Index: flgrRtCapture.c =================================================================== RCS file: /cvsroot/fulguro/fulguro/src/rtcapture/flgrRtCapture.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** flgrRtCapture.c 2 Sep 2008 08:46:45 -0000 1.18 --- flgrRtCapture.c 2 Sep 2008 08:47:08 -0000 1.19 *************** *** 408,411 **** --- 408,412 ---- if( ioctl (viddev->fd, VIDIOCGWIN, &(viddev->vwin)) < 0 ) { + POST_ERROR("Could not get capture resolution\n"); return FLGR_RET_UNDEFINED_ERROR; } |
From: impchris <imp...@us...> - 2008-09-02 08:46:37
|
Update of /cvsroot/fulguro/fulguro/src/rtcapture In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv24048/src/rtcapture Modified Files: flgrRtCapture.c Log Message: Index: flgrRtCapture.c =================================================================== RCS file: /cvsroot/fulguro/fulguro/src/rtcapture/flgrRtCapture.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** flgrRtCapture.c 2 Sep 2008 08:45:56 -0000 1.17 --- flgrRtCapture.c 2 Sep 2008 08:46:45 -0000 1.18 *************** *** 408,413 **** if( ioctl (viddev->fd, VIDIOCGWIN, &(viddev->vwin)) < 0 ) { - POST_ERROR("Could not change capture resolution to %d x %d \n", - viddev->vcap.maxwidth, viddev->vcap.maxheight); return FLGR_RET_UNDEFINED_ERROR; } --- 408,411 ---- |
From: impchris <imp...@us...> - 2008-09-02 08:45:47
|
Update of /cvsroot/fulguro/fulguro/src/rtcapture In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv23656/src/rtcapture Modified Files: flgrRtCapture.c Log Message: Index: flgrRtCapture.c =================================================================== RCS file: /cvsroot/fulguro/fulguro/src/rtcapture/flgrRtCapture.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** flgrRtCapture.c 2 Sep 2008 08:34:35 -0000 1.16 --- flgrRtCapture.c 2 Sep 2008 08:45:56 -0000 1.17 *************** *** 276,280 **** ! POST_INFO("Current palette : %s",flgr2d_rtcapture_get_palette(viddev)); /* POST_INFO("Change Capture resolution to maximum capabilities"); */ /* viddev->vwin.width = viddev->vcap.maxwidth; */ --- 276,281 ---- ! POST_INFO("Current palette : %s\n",flgr2d_rtcapture_get_palette(viddev)); ! /* POST_INFO("Change Capture resolution to maximum capabilities"); */ /* viddev->vwin.width = viddev->vcap.maxwidth; */ *************** *** 368,380 **** viddev->vmmap.width = size_x; viddev->vmmap.height = size_y; - if( ioctl (viddev->fd, VIDIOCSWIN, &(viddev->vwin)) < 0 ) { - POST_ERROR("Could not change capture resolution to %d x %d \n", - viddev->vcap.maxwidth, viddev->vcap.maxheight); - return FLGR_RET_UNDEFINED_ERROR; - } ! if( ioctl (viddev->fd, VIDIOCGWIN, &(viddev->vwin)) < 0 ) { POST_ERROR("Could not change capture resolution to %d x %d \n", ! viddev->vcap.maxwidth, viddev->vcap.maxheight); return FLGR_RET_UNDEFINED_ERROR; } --- 369,376 ---- viddev->vmmap.width = size_x; viddev->vmmap.height = size_y; ! if( ioctl (viddev->fd, VIDIOCSWIN, &(viddev->vwin)) < 0 ) { POST_ERROR("Could not change capture resolution to %d x %d \n", ! size_x, size_y); return FLGR_RET_UNDEFINED_ERROR; } |
From: impchris <imp...@us...> - 2008-09-02 08:34:27
|
Update of /cvsroot/fulguro/fulguro/src/rtcapture In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv18838/src/rtcapture Modified Files: flgrRtCapture.c Log Message: Index: flgrRtCapture.c =================================================================== RCS file: /cvsroot/fulguro/fulguro/src/rtcapture/flgrRtCapture.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** flgrRtCapture.c 2 Sep 2008 08:24:57 -0000 1.15 --- flgrRtCapture.c 2 Sep 2008 08:34:35 -0000 1.16 *************** *** 455,459 **** if( (viddev->vpic.palette != VIDEO_PALETTE_YUV420P ) && ! (viddev->vpic.palette != VIDEO_PALETTE_RGB24) ){ POST_ERROR("Capture device could not work with Gray images\n"); return FLGR_RET_UNDEFINED_ERROR; --- 455,460 ---- if( (viddev->vpic.palette != VIDEO_PALETTE_YUV420P ) && ! (viddev->vpic.palette != VIDEO_PALETTE_RGB32 ) && ! (viddev->vpic.palette != VIDEO_PALETTE_RGB24 ) ){ POST_ERROR("Capture device could not work with Gray images\n"); return FLGR_RET_UNDEFINED_ERROR; *************** *** 485,489 **** tmp += ptr[k++]; tmp += ptr[k++]; - tmp++; rowptr[j]=tmp/3; } --- 486,489 ---- |
From: impchris <imp...@us...> - 2008-09-02 08:24:49
|
Update of /cvsroot/fulguro/fulguro/src/rtcapture In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv13367/src/rtcapture Modified Files: flgrRtCapture.c Log Message: Added rgb32 get gray image Index: flgrRtCapture.c =================================================================== RCS file: /cvsroot/fulguro/fulguro/src/rtcapture/flgrRtCapture.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** flgrRtCapture.c 4 Jun 2008 15:02:00 -0000 1.14 --- flgrRtCapture.c 2 Sep 2008 08:24:57 -0000 1.15 *************** *** 275,285 **** } ! POST_INFO("Change Capture resolution to maximum capabilities"); ! viddev->vwin.width = viddev->vcap.maxwidth; ! viddev->vwin.height = viddev->vcap.maxheight; ! if( ioctl (viddev->fd, VIDIOCSWIN, &(viddev->vwin)) < 0 ) { ! POST_WARNING("Could not change capture resolution to %d x %d \n", ! viddev->vcap.maxwidth, viddev->vcap.maxheight); ! } POST_INFO("MMAP Frame Buffer\n"); --- 275,287 ---- } ! ! POST_INFO("Current palette : %s",flgr2d_rtcapture_get_palette(viddev)); ! /* POST_INFO("Change Capture resolution to maximum capabilities"); */ ! /* viddev->vwin.width = viddev->vcap.maxwidth; */ ! /* viddev->vwin.height = viddev->vcap.maxheight; */ ! /* if( ioctl (viddev->fd, VIDIOCSWIN, &(viddev->vwin)) < 0 ) { */ ! /* POST_WARNING("Could not change capture resolution to %d x %d \n", */ ! /* viddev->vcap.maxwidth, viddev->vcap.maxheight); */ ! /* } */ POST_INFO("MMAP Frame Buffer\n"); *************** *** 475,478 **** --- 477,493 ---- ptr += img->size_x; } + }else if( viddev->vpic.palette == VIDEO_PALETTE_RGB32 ) { + for(i=0 ; i<img->size_y ; i++) { + rowptr = img->array[i]; + k=0; + for(j=0 ; j<img->size_x ; j++) { + tmp = ptr[k++]; + tmp += ptr[k++]; + tmp += ptr[k++]; + tmp++; + rowptr[j]=tmp/3; + } + ptr += img->size_x*4; + } }else { for(i=0 ; i<img->size_y ; i++) { |
From: impchris <imp...@us...> - 2008-09-02 08:24:49
|
Update of /cvsroot/fulguro/fulguro/doc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv13367/doc Modified Files: Doxyfile Log Message: Added rgb32 get gray image Index: Doxyfile =================================================================== RCS file: /cvsroot/fulguro/fulguro/doc/Doxyfile,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Doxyfile 3 Apr 2008 09:31:32 -0000 1.14 --- Doxyfile 2 Sep 2008 08:24:56 -0000 1.15 *************** *** 5,9 **** #--------------------------------------------------------------------------- PROJECT_NAME = Fulguro ! PROJECT_NUMBER = 2.1.0 OUTPUT_DIRECTORY = ../doc CREATE_SUBDIRS = NO --- 5,9 ---- #--------------------------------------------------------------------------- PROJECT_NAME = Fulguro ! PROJECT_NUMBER = 2.1.1 OUTPUT_DIRECTORY = ../doc CREATE_SUBDIRS = NO |
From: impchris <imp...@us...> - 2008-08-25 07:40:40
|
Update of /cvsroot/fulguro/fulguro In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv2978 Modified Files: fulguro_winprj.cbp Log Message: Index: fulguro_winprj.cbp =================================================================== RCS file: /cvsroot/fulguro/fulguro/fulguro_winprj.cbp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** fulguro_winprj.cbp 15 May 2008 06:45:59 -0000 1.13 --- fulguro_winprj.cbp 25 Aug 2008 07:40:46 -0000 1.14 *************** *** 19,22 **** --- 19,23 ---- <Add option="-DBUILD_DLL" /> <Add option="-DLIB_PNG_SUPPORT" /> + <Add option="-DFLGR_PROC_NUMBER=1" /> </Compiler> </Target> *************** *** 68,71 **** --- 69,80 ---- </Unit> <Unit filename="src\arith\flgrArithSSE2.h" /> + <Unit filename="src\arith\flgrArithShift.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="src\arith\flgrArithShift.h" /> + <Unit filename="src\arith\flgrArithShiftFast.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="src\arith\flgrArithShiftFast.h" /> <Unit filename="src\core\flgrCoreArithDef.c"> <Option compilerVar="CC" /> *************** *** 84,91 **** </Unit> <Unit filename="src\core\flgrCoreCompare.h" /> ! <Unit filename="src\core\flgrCoreCompareSSE2.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\core\flgrCoreCompareSSE2.h" /> <Unit filename="src\core\flgrCoreCopy.c"> <Option compilerVar="CC" /> --- 93,100 ---- </Unit> <Unit filename="src\core\flgrCoreCompare.h" /> ! <Unit filename="src\core\flgrCoreCompareFast.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\core\flgrCoreCompareFast.h" /> <Unit filename="src\core\flgrCoreCopy.c"> <Option compilerVar="CC" /> *************** *** 131,138 **** </Unit> <Unit filename="src\core\flgrCoreReplace.h" /> ! <Unit filename="src\core\flgrCoreReplaceSSE2.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\core\flgrCoreReplaceSSE2.h" /> <Unit filename="src\core\flgrCoreRoI.c"> <Option compilerVar="CC" /> --- 140,147 ---- </Unit> <Unit filename="src\core\flgrCoreReplace.h" /> ! <Unit filename="src\core\flgrCoreReplaceFast.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\core\flgrCoreReplaceFast.h" /> <Unit filename="src\core\flgrCoreRoI.c"> <Option compilerVar="CC" /> *************** *** 151,158 **** </Unit> <Unit filename="src\core\flgrCoreShift.h" /> ! <Unit filename="src\core\flgrCoreShiftSSE2.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\core\flgrCoreShiftSSE2.h" /> <Unit filename="src\core\flgrCoreSlideWindow.c"> <Option compilerVar="CC" /> --- 160,167 ---- </Unit> <Unit filename="src\core\flgrCoreShift.h" /> ! <Unit filename="src\core\flgrCoreShiftFast.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\core\flgrCoreShiftFast.h" /> <Unit filename="src\core\flgrCoreSlideWindow.c"> <Option compilerVar="CC" /> *************** *** 175,186 **** </Unit> <Unit filename="src\core\flgrCoreTranspose.h" /> ! <Unit filename="src\core\flgrCoreTransposeSSE.c"> ! <Option compilerVar="CC" /> ! </Unit> ! <Unit filename="src\core\flgrCoreTransposeSSE.h" /> ! <Unit filename="src\core\flgrCoreTransposeSSE2.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\core\flgrCoreTransposeSSE2.h" /> <Unit filename="src\core\flgrCoreTypes.c"> <Option compilerVar="CC" /> --- 184,192 ---- </Unit> <Unit filename="src\core\flgrCoreTranspose.h" /> ! <Unit filename="src\core\flgrCoreTransposeFast.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\core\flgrCoreTransposeFast.h" /> ! <Unit filename="src\core\flgrCoreTransposeFastUtil.h" /> <Unit filename="src\core\flgrCoreTypes.c"> <Option compilerVar="CC" /> *************** *** 280,299 **** </Unit> <Unit filename="src\morpho\flgrMorphoBase.h" /> ! <Unit filename="src\morpho\flgrMorphoBaseSSE.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\morpho\flgrMorphoBaseSSE.h" /> ! <Unit filename="src\morpho\flgrMorphoBaseSegment.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\morpho\flgrMorphoBaseSegment.h" /> ! <Unit filename="src\morpho\flgrMorphoBaseSegmentSSE.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\morpho\flgrMorphoBaseSegmentSSE.h" /> ! <Unit filename="src\morpho\flgrMorphoBaseSegmentSSE2.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\morpho\flgrMorphoBaseSegmentSSE2.h" /> <Unit filename="src\morpho\flgrMorphoDistance.c"> <Option compilerVar="CC" /> --- 286,305 ---- </Unit> <Unit filename="src\morpho\flgrMorphoBase.h" /> ! <Unit filename="src\morpho\flgrMorphoBaseFast.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\morpho\flgrMorphoBaseFast.h" /> ! <Unit filename="src\morpho\flgrMorphoBaseLog.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\morpho\flgrMorphoBaseLog.h" /> ! <Unit filename="src\morpho\flgrMorphoBaseSegment.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\morpho\flgrMorphoBaseSegment.h" /> ! <Unit filename="src\morpho\flgrMorphoBaseSegmentFast.c"> <Option compilerVar="CC" /> </Unit> ! <Unit filename="src\morpho\flgrMorphoBaseSegmentFast.h" /> <Unit filename="src\morpho\flgrMorphoDistance.c"> <Option compilerVar="CC" /> *************** *** 328,331 **** --- 334,345 ---- </Unit> <Unit filename="src\morpho\flgrMorphoLabel.h" /> + <Unit filename="src\morpho\flgrMorphoSkiz.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="src\morpho\flgrMorphoSkiz.h" /> + <Unit filename="src\morpho\flgrMorphoSkizFast.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="src\morpho\flgrMorphoSkizFast.h" /> <Unit filename="src\morpho\flgrMorphoWatershed.c"> <Option compilerVar="CC" /> |
From: impchris <imp...@us...> - 2008-08-25 07:28:01
|
Update of /cvsroot/fulguro/fulguro/swig/core In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv31812 Modified Files: flgrcore.i Log Message: Index: flgrcore.i =================================================================== RCS file: /cvsroot/fulguro/fulguro/swig/core/flgrcore.i,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** flgrcore.i 30 Jul 2008 08:59:06 -0000 1.80 --- flgrcore.i 25 Aug 2008 07:28:09 -0000 1.81 *************** *** 79,84 **** [return] integer\n Get the number of available processors ! """) flgr_get_number_processors; ! int flgr_get_number_processors(void); %feature("autodoc",""" --- 79,84 ---- [return] integer\n Get the number of available processors ! """) flgr_get_processor_numbers; ! int flgr_get_processor_numbers(void); %feature("autodoc",""" |
From: impchris <imp...@us...> - 2008-08-25 07:27:43
|
Update of /cvsroot/fulguro/fulguro/src/core In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv31642/core Modified Files: flgrCoreSystem.c Log Message: Index: flgrCoreSystem.c =================================================================== RCS file: /cvsroot/fulguro/fulguro/src/core/flgrCoreSystem.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** flgrCoreSystem.c 6 Jul 2008 08:16:20 -0000 1.6 --- flgrCoreSystem.c 25 Aug 2008 07:27:50 -0000 1.7 *************** *** 43,47 **** ! int flgr_get_number_processors(void) { return FLGR_PROC_NUMBER; } --- 43,47 ---- ! int flgr_get_processor_numbers(void) { return FLGR_PROC_NUMBER; } |
From: impchris <imp...@us...> - 2008-08-25 07:27:43
|
Update of /cvsroot/fulguro/fulguro/src/histogram In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv31642/histogram Modified Files: flgrHistogram.h Log Message: Index: flgrHistogram.h =================================================================== RCS file: /cvsroot/fulguro/fulguro/src/histogram/flgrHistogram.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** flgrHistogram.h 27 Mar 2008 16:04:11 -0000 1.13 --- flgrHistogram.h 25 Aug 2008 07:27:51 -0000 1.14 *************** *** 25,29 **** #ifndef __HISTOGRAM_OPERATION_H #define __HISTOGRAM_OPERATION_H ! #include <flgrCoreDll.h> #include <flgrCoreErrors.h> --- 25,29 ---- #ifndef __HISTOGRAM_OPERATION_H #define __HISTOGRAM_OPERATION_H ! #include <flgrCoreDll.h> #include <flgrCoreErrors.h> *************** *** 60,63 **** --- 60,64 ---- + EXPORT_LIB FLGR_Ret flgr2d_get_histogram(FLGR_Data1D *histogram, FLGR_Data2D *datsrc); #endif |
From: impchris <imp...@us...> - 2008-07-30 14:56:31
|
Update of /cvsroot/fulguro/fulguro/swig/measure In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv26623/swig/measure Modified Files: flgrmeasure.i flgrmeasure_ext.c flgrmeasure_ext.h Log Message: Index: flgrmeasure_ext.h =================================================================== RCS file: /cvsroot/fulguro/fulguro/swig/measure/flgrmeasure_ext.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** flgrmeasure_ext.h 29 Feb 2008 15:39:52 -0000 1.7 --- flgrmeasure_ext.h 30 Jul 2008 14:56:38 -0000 1.8 *************** *** 39,42 **** --- 39,43 ---- extern FLGR_Vector *flgr2d_measure_volume_1(FLGR_Data2D *, FLGR_Vector *); + extern FLGR_Vector *flgr1d_measure_expected_value_1(FLGR_Data1D *, FLGR_Vector *); extern FLGR_Vector **flgr1d_measure_min_max_2(FLGR_Data1D *dat); *************** *** 47,50 **** --- 48,52 ---- extern FLGR_Vector *flgr2d_measure_volume_2(FLGR_Data2D *dat, FLGR_Type type); + extern FLGR_Vector *flgr1d_measure_expected_value_2(FLGR_Data1D *dat, FLGR_Type type); Index: flgrmeasure_ext.c =================================================================== RCS file: /cvsroot/fulguro/fulguro/swig/measure/flgrmeasure_ext.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** flgrmeasure_ext.c 29 Feb 2008 15:39:52 -0000 1.11 --- flgrmeasure_ext.c 30 Jul 2008 14:56:37 -0000 1.12 *************** *** 57,60 **** --- 57,64 ---- } + FLGR_Vector *flgr1d_measure_expected_value_1(FLGR_Data1D *dat, FLGR_Vector *expected_value) { + flgr1d_measure_expected_value(dat, expected_value); + return expected_value; + } *************** *** 99,100 **** --- 103,113 ---- return vec; } + + FLGR_Vector *flgr1d_measure_expected_value_2(FLGR_Data1D *dat, FLGR_Type type) { + FLGR_Vector *vec = flgr_vector_create(dat->spp,type); + + flgr1d_measure_expected_value(dat, vec); + + return vec; + } + Index: flgrmeasure.i =================================================================== RCS file: /cvsroot/fulguro/fulguro/swig/measure/flgrmeasure.i,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** flgrmeasure.i 14 Apr 2008 09:31:43 -0000 1.18 --- flgrmeasure.i 30 Jul 2008 14:56:37 -0000 1.19 *************** *** 63,66 **** --- 63,81 ---- + %feature("autodoc",""" + [in] data to measure (FLGR_Data1D) + + optional: + [out] vector expected_value (FLGR_Vector) + or + [in] type of the expected_value (FLGR_Type) + + [return] [vol_channel_0, vol_channel_n]\n + Get the expected value + """) flgr1d_measure_expected_value_1; + %feature("autodoc"," ") flgr1d_measure_expected_value_2; + %feature("autodoc"," ") flgr1d_measure_expected_value; + + *************** *** 113,116 **** --- 128,133 ---- + %rename (flgr1d_measure_expected_value) flgr1d_measure_expected_value_1(FLGR_Data1D *, FLGR_Vector *); + %rename (flgr1d_measure_expected_value) flgr1d_measure_expected_value_2(FLGR_Data1D *, FLGR_Type = FLGR_UINT32); %rename (flgr1d_measure_volume) flgr1d_measure_volume_1(FLGR_Data1D *, FLGR_Vector *); *************** *** 423,426 **** --- 440,447 ---- extern FLGR_Vector *flgr1d_measure_volume_1(FLGR_Data1D *, FLGR_Vector *); extern FLGR_Vector *flgr2d_measure_volume_1(FLGR_Data2D *, FLGR_Vector *); + + extern FLGR_Vector *flgr1d_measure_expected_value_1(FLGR_Data1D *, FLGR_Vector *); + + %clear (FLGR_Vector *); *************** *** 496,499 **** --- 517,522 ---- extern FLGR_Vector *flgr1d_measure_volume_2(FLGR_Data1D *dat, FLGR_Type type = FLGR_UINT32); extern FLGR_Vector *flgr2d_measure_volume_2(FLGR_Data2D *dat, FLGR_Type type = FLGR_UINT32); + + extern FLGR_Vector *flgr1d_measure_expected_value_2(FLGR_Data1D *dat, FLGR_Type type = FLGR_UINT32); %clear (FLGR_Vector *); |
From: impchris <imp...@us...> - 2008-07-30 14:56:30
|
Update of /cvsroot/fulguro/fulguro/src/measure In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv26623/src/measure Modified Files: flgrMeasureBase.c flgrMeasureBase.h Log Message: Index: flgrMeasureBase.c =================================================================== RCS file: /cvsroot/fulguro/fulguro/src/measure/flgrMeasureBase.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** flgrMeasureBase.c 6 Apr 2008 18:54:53 -0000 1.22 --- flgrMeasureBase.c 30 Jul 2008 14:56:36 -0000 1.23 *************** *** 572,579 **** --- 572,832 ---- + #define FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(dtype,dtypeV) \ + dtype *psrc = (dtype*) datsrc->array; \ + dtypeV *pvec = (dtypeV*) expval->array; \ + dtype val; \ + int spp = datsrc->spp; \ + int len = datsrc->length; \ + int i,j,k; \ + \ + for(k=0 ; k<spp ; k++) { \ + pvec[k]=0; \ + for(i=0,j=0 ; j<spp*len ; j+=spp,i++) { \ + val = flgr_get_array_##dtype(psrc,j+k); \ + pvec[k] += (dtypeV) ((i+1)*val); \ + } \ + } \ + \ + return + void flgr1d_measure_expected_value_u32_fgBIT(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgBIT,fgUINT32); + } + void flgr1d_measure_expected_value_u32_fgUINT8(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgUINT8,fgUINT32); + } + void flgr1d_measure_expected_value_u32_fgUINT16(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgUINT16,fgUINT32); + } + void flgr1d_measure_expected_value_u32_fgUINT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgUINT32,fgUINT32); + } + void flgr1d_measure_expected_value_u32_fgINT8(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_INT8); + } + void flgr1d_measure_expected_value_u32_fgINT16(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_INT16); + } + void flgr1d_measure_expected_value_u32_fgINT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_INT32); + } + void flgr1d_measure_expected_value_u32_fgFLOAT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_FLOAT32); + } + void flgr1d_measure_expected_value_u32_fgFLOAT64(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_FLOAT64); + } + void flgr1d_measure_expected_value_s32_fgBIT(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_BIT); + } + void flgr1d_measure_expected_value_s32_fgUINT8(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_UINT8); + } + void flgr1d_measure_expected_value_s32_fgUINT16(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_UINT16); + } + void flgr1d_measure_expected_value_s32_fgUINT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_UINT32); + } + void flgr1d_measure_expected_value_s32_fgINT8(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgINT8,fgINT32); + } + void flgr1d_measure_expected_value_s32_fgINT16(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgINT16,fgINT32); + } + void flgr1d_measure_expected_value_s32_fgINT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgINT32,fgINT32); + } + void flgr1d_measure_expected_value_s32_fgFLOAT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_FLOAT32); + } + void flgr1d_measure_expected_value_s32_fgFLOAT64(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_FLOAT64); + } + + void flgr1d_measure_expected_value_u64_fgBIT(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgBIT,fgUINT64); + } + void flgr1d_measure_expected_value_u64_fgUINT8(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgUINT8,fgUINT64); + } + void flgr1d_measure_expected_value_u64_fgUINT16(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgUINT16,fgUINT64); + } + void flgr1d_measure_expected_value_u64_fgUINT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgUINT32,fgUINT64); + } + void flgr1d_measure_expected_value_u64_fgINT8(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_INT8); + } + void flgr1d_measure_expected_value_u64_fgINT16(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_INT16); + } + void flgr1d_measure_expected_value_u64_fgINT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_INT32); + } + void flgr1d_measure_expected_value_u64_fgFLOAT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_FLOAT32); + } + void flgr1d_measure_expected_value_u64_fgFLOAT64(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_FLOAT64); + } + + void flgr1d_measure_expected_value_s64_fgBIT(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_BIT); + } + void flgr1d_measure_expected_value_s64_fgUINT8(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_UINT8); + } + void flgr1d_measure_expected_value_s64_fgUINT16(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_UINT16); + } + void flgr1d_measure_expected_value_s64_fgUINT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_UINT32); + } + void flgr1d_measure_expected_value_s64_fgINT8(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgINT8,fgINT64); + } + void flgr1d_measure_expected_value_s64_fgINT16(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgINT16,fgINT64); + } + void flgr1d_measure_expected_value_s64_fgINT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgINT32,fgINT64); + } + void flgr1d_measure_expected_value_s64_fgFLOAT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_FLOAT32); + } + void flgr1d_measure_expected_value_s64_fgFLOAT64(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + flgr_no_define_type_function(FLGR_FLOAT64); + } + void flgr1d_measure_expected_value_f32_fgBIT(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgBIT,fgFLOAT32); + } + void flgr1d_measure_expected_value_f32_fgUINT8(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgUINT8,fgFLOAT32); + } + void flgr1d_measure_expected_value_f32_fgUINT16(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgUINT16,fgFLOAT32); + } + void flgr1d_measure_expected_value_f32_fgUINT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgUINT32,fgFLOAT32); + } + void flgr1d_measure_expected_value_f32_fgINT8(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgINT8,fgFLOAT32); + } + void flgr1d_measure_expected_value_f32_fgINT16(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgINT16,fgFLOAT32); + } + void flgr1d_measure_expected_value_f32_fgINT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgINT32,fgFLOAT32); + } + void flgr1d_measure_expected_value_f32_fgFLOAT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgFLOAT32,fgFLOAT32); + } + void flgr1d_measure_expected_value_f32_fgFLOAT64(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgFLOAT64,fgFLOAT32); + } + + void flgr1d_measure_expected_value_f64_fgBIT(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgBIT,fgFLOAT64); + } + void flgr1d_measure_expected_value_f64_fgUINT8(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgUINT8,fgFLOAT64); + } + void flgr1d_measure_expected_value_f64_fgUINT16(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgUINT16,fgFLOAT64); + } + void flgr1d_measure_expected_value_f64_fgUINT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgUINT32,fgFLOAT64); + } + void flgr1d_measure_expected_value_f64_fgINT8(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgINT8,fgFLOAT64); + } + void flgr1d_measure_expected_value_f64_fgINT16(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgINT16,fgFLOAT64); + } + void flgr1d_measure_expected_value_f64_fgINT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgINT32,fgFLOAT64); + } + void flgr1d_measure_expected_value_f64_fgFLOAT32(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgFLOAT32,fgFLOAT64); + } + void flgr1d_measure_expected_value_f64_fgFLOAT64(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR1D_MACRO_MEASURE_EXPECTED_VALUE(fgFLOAT64,fgFLOAT64); + } + + #define FLGR1D_MEASURE_EXP_VAL_PREDISPATCH(dtype,vector_type,...) \ + switch(vector_type) { \ + case FLGR_UINT32: \ + flgr1d_measure_expected_value_u32_##dtype(__VA_ARGS__);break; \ + case FLGR_UINT64: \ + flgr1d_measure_expected_value_u64_##dtype(__VA_ARGS__);break; \ + case FLGR_INT32: \ + flgr1d_measure_expected_value_s32_##dtype(__VA_ARGS__);break; \ + case FLGR_INT64: \ + flgr1d_measure_expected_value_s64_##dtype(__VA_ARGS__);break; \ + case FLGR_FLOAT32: \ + flgr1d_measure_expected_value_f32_##dtype(__VA_ARGS__);break; \ + case FLGR_FLOAT64: \ + flgr1d_measure_expected_value_f64_##dtype(__VA_ARGS__);break; \ + default: \ + POST_ERROR("Unsupported expected_value vector type : %s\n", \ + flgr_get_type_string(vector_type)); \ + } \ + return + + + + void flgr1d_measure_expected_value_fgBIT(FLGR_Data1D *dat, FLGR_Vector *expected_value) { + FLGR1D_MEASURE_EXP_VAL_PREDISPATCH(fgBIT,expected_value->type,dat,expected_value); + } + void flgr1d_measure_expected_value_fgUINT8(FLGR_Data1D *dat, FLGR_Vector *expected_value) { + FLGR1D_MEASURE_EXP_VAL_PREDISPATCH(fgUINT8,expected_value->type,dat,expected_value); + } + void flgr1d_measure_expected_value_fgUINT16(FLGR_Data1D *dat, FLGR_Vector *expected_value) { + FLGR1D_MEASURE_EXP_VAL_PREDISPATCH(fgUINT16,expected_value->type,dat,expected_value); + } + void flgr1d_measure_expected_value_fgUINT32(FLGR_Data1D *dat, FLGR_Vector *expected_value) { + FLGR1D_MEASURE_EXP_VAL_PREDISPATCH(fgUINT32,expected_value->type,dat,expected_value); + } + void flgr1d_measure_expected_value_fgINT8(FLGR_Data1D *dat, FLGR_Vector *expected_value) { + FLGR1D_MEASURE_EXP_VAL_PREDISPATCH(fgINT8,expected_value->type,dat,expected_value); + } + void flgr1d_measure_expected_value_fgINT16(FLGR_Data1D *dat, FLGR_Vector *expected_value) { + FLGR1D_MEASURE_EXP_VAL_PREDISPATCH(fgINT16,expected_value->type,dat,expected_value); + } + void flgr1d_measure_expected_value_fgINT32(FLGR_Data1D *dat, FLGR_Vector *expected_value) { + FLGR1D_MEASURE_EXP_VAL_PREDISPATCH(fgINT32,expected_value->type,dat,expected_value); + } + void flgr1d_measure_expected_value_fgFLOAT32(FLGR_Data1D *dat, FLGR_Vector *expected_value) { + FLGR1D_MEASURE_EXP_VAL_PREDISPATCH(fgFLOAT32,expected_value->type,dat,expected_value); + } + void flgr1d_measure_expected_value_fgFLOAT64(FLGR_Data1D *dat, FLGR_Vector *expected_value) { + FLGR1D_MEASURE_EXP_VAL_PREDISPATCH(fgFLOAT64,expected_value->type,dat,expected_value); + } + + + //////////////////////////////////////////////////////////////////////////// + /*! Measure the expected value + * + * @param dat : pointer to the FLGR_Data1D + * @param expval : pointer a vector. + * @returns FLGR_RET_OK, ... + */ + ////////////////////////////////////////////////////////////////// + FLGR_Ret flgr1d_measure_expected_value(FLGR_Data1D *datsrc, FLGR_Vector *expval) { + FLGR_DECLARE_FUNCTION; + + if((datsrc == NULL) || (expval==NULL)) { + POST_ERROR("Null object\n"); + return FLGR_RET_NULL_OBJECT; + } + + FLGR_DISPATCH_PROCEDURE(datsrc->type,flgr1d_measure_expected_value,datsrc,expval); + return FLGR_RET_OK; + } Index: flgrMeasureBase.h =================================================================== RCS file: /cvsroot/fulguro/fulguro/src/measure/flgrMeasureBase.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** flgrMeasureBase.h 4 Jun 2008 15:02:00 -0000 1.12 --- flgrMeasureBase.h 30 Jul 2008 14:56:37 -0000 1.13 *************** *** 35,38 **** --- 35,39 ---- EXPORT_LIB FLGR_Ret flgr1d_measure_min_max(FLGR_Data1D *dat, FLGR_Vector *mini, FLGR_Vector *maxi); EXPORT_LIB FLGR_Ret flgr1d_measure_volume(FLGR_Data1D *dat, FLGR_Vector *volume); + EXPORT_LIB FLGR_Ret flgr1d_measure_expected_value(FLGR_Data1D *dat, FLGR_Vector *expval); EXPORT_LIB FLGR_Ret flgr2d_measure_min_max(FLGR_Data2D *dat, FLGR_Vector *mini, FLGR_Vector *maxi); *************** *** 62,65 **** --- 63,76 ---- EXPORT_LIB void flgr1d_measure_volume_fgFLOAT64(FLGR_Data1D *dat, FLGR_Vector *volume); + EXPORT_LIB void flgr1d_measure_expected_value_fgBIT(FLGR_Data1D *dat, FLGR_Vector *expected_value); + EXPORT_LIB void flgr1d_measure_expected_value_fgUINT8(FLGR_Data1D *dat, FLGR_Vector *expected_value); + EXPORT_LIB void flgr1d_measure_expected_value_fgUINT16(FLGR_Data1D *dat, FLGR_Vector *expected_value); + EXPORT_LIB void flgr1d_measure_expected_value_fgUINT32(FLGR_Data1D *dat, FLGR_Vector *expected_value); + EXPORT_LIB void flgr1d_measure_expected_value_fgINT8(FLGR_Data1D *dat, FLGR_Vector *expected_value); + EXPORT_LIB void flgr1d_measure_expected_value_fgINT16(FLGR_Data1D *dat, FLGR_Vector *expected_value); + EXPORT_LIB void flgr1d_measure_expected_value_fgINT32(FLGR_Data1D *dat, FLGR_Vector *expected_value); + EXPORT_LIB void flgr1d_measure_expected_value_fgFLOAT32(FLGR_Data1D *dat, FLGR_Vector *expected_value); + EXPORT_LIB void flgr1d_measure_expected_value_fgFLOAT64(FLGR_Data1D *dat, FLGR_Vector *expected_value); + EXPORT_LIB void flgr2d_measure_min_max_fgBIT(FLGR_Data2D *dat, FLGR_Vector *mini, FLGR_Vector *maxi); EXPORT_LIB void flgr2d_measure_min_max_fgUINT8(FLGR_Data2D *dat, FLGR_Vector *mini, FLGR_Vector *maxi); |
From: impchris <imp...@us...> - 2008-07-30 14:56:29
|
Update of /cvsroot/fulguro/fulguro/swig/histogram In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv26623/swig/histogram Modified Files: flgrhistogram.i Log Message: Index: flgrhistogram.i =================================================================== RCS file: /cvsroot/fulguro/fulguro/swig/histogram/flgrhistogram.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** flgrhistogram.i 27 Mar 2008 16:04:13 -0000 1.3 --- flgrhistogram.i 30 Jul 2008 14:56:37 -0000 1.4 *************** *** 61,62 **** --- 61,69 ---- FLGR_Ret flgr2d_histogram_normalize(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Vector *boundmin, FLGR_Vector *boundmax); + %feature("autodoc",""" + [out] Histogram signal (FLGR_Data1D) + [in] Source image (FLGR_Data2D) + [return] FLGR_Ret \n + Compute the histogram of a FLGR_UINT8 or FLGR_UINT16 image + """) flgr2d_get_histogram; + FLGR_Ret flgr2d_get_histogram(FLGR_Data1D *histogram, FLGR_Data2D *datsrc); |
From: impchris <imp...@us...> - 2008-07-30 14:56:28
|
Update of /cvsroot/fulguro/fulguro/src/histogram In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv26623/src/histogram Modified Files: flgrHistogram.c Log Message: Index: flgrHistogram.c =================================================================== RCS file: /cvsroot/fulguro/fulguro/src/histogram/flgrHistogram.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** flgrHistogram.c 27 Mar 2008 16:04:11 -0000 1.17 --- flgrHistogram.c 30 Jul 2008 14:56:36 -0000 1.18 *************** *** 24,27 **** --- 24,28 ---- #include <string.h> #include <math.h> + #include <flgrCoreIO.h> #include <flgrCoreDispatch.h> #include <flgrCoreMalloc.h> *************** *** 290,291 **** --- 291,406 ---- + + + #define FLGR2D_MACRO_GET_HISTOGRAM(dtype,dtypeHist) \ + dtypeHist *phisto = (dtypeHist *) histogram->array; \ + dtypeHist tmp1; \ + dtypeHist tmp2; \ + dtype val; \ + dtype *psrc; \ + int i,j,k; \ + int spp = datsrc->spp; \ + int linelen = datsrc->size_x*spp; \ + \ + flgr1d_clear_all(histogram); \ + \ + for(i=0 ; i<datsrc->size_y ; i++) { \ + psrc = (dtype*) datsrc->array[i]; \ + \ + for(k=0 ; k<spp ; k++) { \ + \ + for(j=0 ; j<linelen ; j+=spp) { \ + val = flgr_get_array_##dtype(psrc, j+k); \ + tmp1 = ((dtypeHist) (val))*spp+k; \ + tmp2 = flgr_get_array_##dtypeHist(phisto,tmp1) + 1; \ + flgr_set_array_##dtypeHist(phisto,tmp1,tmp2); \ + } \ + \ + } \ + \ + } \ + \ + return + + + void flgr2d_get_histogram_fgBIT(FLGR_Data1D *histogram, FLGR_Data2D *datsrc) { + flgr_no_define_type_function(FLGR_BIT); + } + void flgr2d_get_histogram_fgUINT8(FLGR_Data1D *histogram, FLGR_Data2D *datsrc) { + if(histogram->type == FLGR_UINT32) { + FLGR2D_MACRO_GET_HISTOGRAM(fgUINT8,fgUINT32); + }else if(histogram->type == FLGR_UINT64) { + FLGR2D_MACRO_GET_HISTOGRAM(fgUINT8,fgUINT64); + }else { + POST_ERROR("Histogram type must be fgUINT32 or fgUINT64\n"); + } + } + void flgr2d_get_histogram_fgUINT16(FLGR_Data1D *histogram, FLGR_Data2D *datsrc) { + if(histogram->type == FLGR_UINT32) { + FLGR2D_MACRO_GET_HISTOGRAM(fgUINT16,fgUINT32); + }else if(histogram->type == FLGR_UINT64) { + FLGR2D_MACRO_GET_HISTOGRAM(fgUINT16,fgUINT64); + }else { + POST_ERROR("Histogram type must be fgUINT32 or fgUINT64\n"); + } + } + void flgr2d_get_histogram_fgUINT32(FLGR_Data1D *histogram, FLGR_Data2D *datsrc) { + flgr_no_define_type_function(FLGR_UINT32); + } + void flgr2d_get_histogram_fgINT8(FLGR_Data1D *histogram, FLGR_Data2D *datsrc) { + flgr_no_define_type_function(FLGR_INT8); + } + void flgr2d_get_histogram_fgINT16(FLGR_Data1D *histogram, FLGR_Data2D *datsrc) { + flgr_no_define_type_function(FLGR_INT16); + } + void flgr2d_get_histogram_fgINT32(FLGR_Data1D *histogram, FLGR_Data2D *datsrc) { + flgr_no_define_type_function(FLGR_INT32); + } + void flgr2d_get_histogram_fgFLOAT32(FLGR_Data1D *histogram, FLGR_Data2D *datsrc) { + flgr_no_define_type_function(FLGR_FLOAT32); + } + void flgr2d_get_histogram_fgFLOAT64(FLGR_Data1D *histogram, FLGR_Data2D *datsrc) { + flgr_no_define_type_function(FLGR_FLOAT64); + } + + FLGR_Ret flgr2d_get_histogram(FLGR_Data1D *histogram, FLGR_Data2D *datsrc) { + int ret; + + FLGR_DECLARE_FUNCTION; + + if((datsrc==NULL) || (histogram==NULL)) { + POST_ERROR("Null objects!\n"); + return FLGR_RET_NULL_OBJECT; + } + + if(datsrc->spp != histogram->spp) { + POST_ERROR("Histogram and image have different pixel vector sizes"); + return FLGR_RET_VECTOR_SIZE_DIFFERENT; + } + + if(datsrc->type == FLGR_UINT8) { + if(histogram->length<256) { + POST_ERROR("histogram length must be at least 256 for UINT8 images\n"); + return FLGR_RET_SIZE_ERROR; + } + }else if(datsrc->type == FLGR_UINT16) { + if(histogram->length<65536) { + POST_ERROR("histogram length must be at least 65536 for UINT16 images\n"); + return FLGR_RET_SIZE_ERROR; + } + } + + FLGR_DISPATCH_PROCEDURE(datsrc->type, flgr2d_get_histogram, histogram,datsrc); + + return ret; + + } + + + + + + + void flgr2d_get_otsu_threshold(FLGR_Vector *vecth, FLGR_Data2D *datsrc) { + + } |
From: impchris <imp...@us...> - 2008-07-30 13:43:18
|
Update of /cvsroot/fulguro/fulguro_scripts/python In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv24509 Added Files: histo.py Log Message: --- NEW FILE: histo.py --- #!/usr/bin/env python from fulguro import * from pylab import * import time ### BENCH PROCEDURES ######################################################### def benchmark(nbiter,function,*args): t=time.clock() for i in range(nbiter): function(*args) t2=time.clock() return ((t2-t)*1000)/nbiter imin = FLGR_Data2D("../../fulguro/apps/images/color/lena.png") histo = FLGR_Data1D(256,imin.spp,FLGR_UINT32) histoR = FLGR_Data1D(256,1,FLGR_UINT32) histoG = FLGR_Data1D(256,1,FLGR_UINT32) histoB = FLGR_Data1D(256,1,FLGR_UINT32) print benchmark(1000,flgr2d_get_histogram,histo,imin) flgr1d_extract_channel(histoR,histo,0) flgr1d_extract_channel(histoG,histo,1) flgr1d_extract_channel(histoB,histo,2) bar(range(256),histoR.to_raw()) show() bar(range(256),histoG.to_raw()) show() bar(range(256),histoB.to_raw()) show() |