⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mask6even.c

📁 一个有关eigenface的matlab 例程
💻 C
字号:
float mask6even[529] = {-0.001696,  0.000164,  0.004907,  0.010185,  0.010131, -0.000477, -0.019168, -0.033175, -0.027539,  0.000350,  0.034061,  0.049176,  0.034061,  0.000350, -0.027539, -0.033175, -0.019168, -0.000477,  0.010131,  0.010185,  0.004907,  0.000164, -0.001696,-0.002843,  0.000275,  0.008226,  0.017073,  0.016982, -0.000799, -0.032130, -0.055610, -0.046162,  0.000586,  0.057096,  0.082433,  0.057096,  0.000586, -0.046162, -0.055610, -0.032130, -0.000799,  0.016982,  0.017073,  0.008226,  0.000275, -0.002843,-0.004536,  0.000439,  0.013127,  0.027245,  0.027100, -0.001276, -0.051273, -0.088743, -0.073666,  0.000936,  0.091114,  0.131547,  0.091113,  0.000936, -0.073666, -0.088743, -0.051273, -0.001276,  0.027100,  0.027245,  0.013127,  0.000439, -0.004536,-0.006892,  0.000667,  0.019942,  0.041391,  0.041170, -0.001938, -0.077894, -0.134817, -0.111912,  0.001421,  0.138419,  0.199845,  0.138419,  0.001421, -0.111912, -0.134817, -0.077894, -0.001938,  0.041170,  0.041391,  0.019942,  0.000667, -0.006892,-0.009967,  0.000965,  0.028842,  0.059861,  0.059542, -0.002803, -0.112655, -0.194980, -0.161854,  0.002056,  0.200189,  0.289027,  0.200189,  0.002056, -0.161854, -0.194980, -0.112654, -0.002803,  0.059542,  0.059861,  0.028841,  0.000965, -0.009967,-0.013723,  0.001328,  0.039710,  0.082419,  0.081979, -0.003859, -0.155106, -0.268454, -0.222845,  0.002831,  0.275625,  0.397939,  0.275625,  0.002830, -0.222845, -0.268454, -0.155105, -0.003859,  0.081979,  0.082419,  0.039710,  0.001328, -0.013723,-0.017987,  0.001741,  0.052049,  0.108028,  0.107452, -0.005058, -0.203301, -0.351870, -0.292089,  0.003710,  0.361269,  0.521590,  0.361269,  0.003710, -0.292089, -0.351870, -0.203301, -0.005058,  0.107452,  0.108028,  0.052049,  0.001741, -0.017987,-0.022444,  0.002172,  0.064946,  0.134798,  0.134080, -0.006311, -0.253680, -0.439064, -0.364469,  0.004629,  0.450793,  0.650841,  0.450793,  0.004629, -0.364469, -0.439064, -0.253680, -0.006311,  0.134080,  0.134798,  0.064946,  0.002172, -0.022444,-0.026661,  0.002580,  0.077150,  0.160127,  0.159273, -0.007497, -0.301346, -0.521565, -0.432953,  0.005499,  0.535497,  0.773135,  0.535497,  0.005499, -0.432953, -0.521565, -0.301346, -0.007497,  0.159273,  0.160127,  0.077150,  0.002580, -0.026661,-0.030151,  0.002918,  0.087247,  0.181083,  0.180118, -0.008478, -0.340785, -0.589825, -0.489616,  0.006219,  0.605581,  0.874319,  0.605580,  0.006219, -0.489616, -0.589825, -0.340785, -0.008478,  0.180118,  0.181083,  0.087247,  0.002918, -0.030151,-0.032460,  0.003141,  0.093929,  0.194952,  0.193912, -0.009127, -0.366884, -0.634997, -0.527114,  0.006695,  0.651959,  0.941280,  0.651959,  0.006695, -0.527114, -0.634997, -0.366884, -0.009127,  0.193913,  0.194952,  0.093929,  0.003141, -0.032460,-0.033268,  0.003219,  0.096268,  0.199807,  0.198742, -0.009354, -0.376021, -0.650810, -0.540240,  0.006862,  0.668195,  0.964721,  0.668195,  0.006862, -0.540240, -0.650810, -0.376021, -0.009354,  0.198742,  0.199807,  0.096268,  0.003219, -0.033268,-0.032460,  0.003141,  0.093929,  0.194952,  0.193912, -0.009127, -0.366884, -0.634997, -0.527114,  0.006695,  0.651960,  0.941279,  0.651960,  0.006695, -0.527113, -0.634997, -0.366884, -0.009127,  0.193912,  0.194952,  0.093929,  0.003141, -0.032460,-0.030151,  0.002918,  0.087247,  0.181083,  0.180118, -0.008478, -0.340785, -0.589825, -0.489616,  0.006219,  0.605581,  0.874319,  0.605581,  0.006219, -0.489616, -0.589825, -0.340785, -0.008478,  0.180118,  0.181083,  0.087247,  0.002918, -0.030151,-0.026661,  0.002580,  0.077150,  0.160127,  0.159273, -0.007497, -0.301346, -0.521565, -0.432953,  0.005499,  0.535498,  0.773135,  0.535498,  0.005499, -0.432953, -0.521565, -0.301346, -0.007497,  0.159273,  0.160127,  0.077150,  0.002580, -0.026661,-0.022444,  0.002172,  0.064946,  0.134798,  0.134080, -0.006311, -0.253680, -0.439064, -0.364469,  0.004629,  0.450793,  0.650842,  0.450793,  0.004629, -0.364469, -0.439064, -0.253680, -0.006311,  0.134080,  0.134798,  0.064946,  0.002172, -0.022444,-0.017987,  0.001741,  0.052049,  0.108028,  0.107452, -0.005058, -0.203301, -0.351870, -0.292089,  0.003710,  0.361269,  0.521590,  0.361269,  0.003710, -0.292089, -0.351870, -0.203301, -0.005058,  0.107452,  0.108028,  0.052049,  0.001741, -0.017987,-0.013723,  0.001328,  0.039710,  0.082419,  0.081979, -0.003859, -0.155105, -0.268454, -0.222845,  0.002830,  0.275625,  0.397939,  0.275625,  0.002831, -0.222845, -0.268454, -0.155106, -0.003859,  0.081979,  0.082419,  0.039710,  0.001328, -0.013723,-0.009967,  0.000965,  0.028842,  0.059861,  0.059542, -0.002803, -0.112654, -0.194980, -0.161854,  0.002056,  0.200189,  0.289027,  0.200189,  0.002056, -0.161854, -0.194980, -0.112654, -0.002803,  0.059542,  0.059861,  0.028842,  0.000965, -0.009967,-0.006892,  0.000667,  0.019942,  0.041391,  0.041170, -0.001938, -0.077894, -0.134817, -0.111912,  0.001421,  0.138419,  0.199845,  0.138419,  0.001421, -0.111912, -0.134817, -0.077894, -0.001938,  0.041170,  0.041391,  0.019942,  0.000667, -0.006892,-0.004536,  0.000439,  0.013127,  0.027245,  0.027100, -0.001276, -0.051273, -0.088743, -0.073666,  0.000936,  0.091113,  0.131547,  0.091114,  0.000936, -0.073666, -0.088743, -0.051273, -0.001276,  0.027100,  0.027245,  0.013127,  0.000439, -0.004536,-0.002843,  0.000275,  0.008226,  0.017073,  0.016982, -0.000799, -0.032130, -0.055610, -0.046162,  0.000586,  0.057096,  0.082433,  0.057096,  0.000586, -0.046162, -0.055610, -0.032130, -0.000799,  0.016982,  0.017073,  0.008226,  0.000275, -0.002843,-0.001696,  0.000164,  0.004907,  0.010185,  0.010131, -0.000477, -0.019168, -0.033175, -0.027539,  0.000350,  0.034061,  0.049176,  0.034061,  0.000350, -0.027539, -0.033175, -0.019168, -0.000477,  0.010131,  0.010185,  0.004907,  0.000164, -0.001696};float apply_mask6even( float* image, int imagew, int imageh, int x, int y ) { float returnvalue; int mx1 = x-( 23/2) >= 0 ? 0 : ( 23/2)-x; int mx2 = x+( 23/2) < imagew ? 23-1 : 23-1 - (x+( 23/2) - (imagew-1)); int my1 = y-( 23/2) >= 0 ? 0 : ( 23/2)-y; int my2 = y+( 23/2) < imageh ? 23-1 : 23-1 - (y+( 23/2) - (imageh-1)); int imagexoffset = x - 23/2; int imageyoffset = y - 23/2; int h , k; returnvalue = 0; for(k = my1; k <= my2; k++){ for(h = mx1; h <= mx2; h++){ returnvalue += mask6even[h+k* 23] * image[imagexoffset+h+imagew*(imageyoffset+k)]; } } return returnvalue; } 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -