Capsim Block Documentation
This star inputs a sequence of images and creates a larger image with the inputted images forming subimages from left to right top to bottom.
Port | Type | Name | |
---|---|---|---|
0 | image_t | y |
Num | Description | Type | Name | Default Value | |
---|---|---|---|---|---|
0 | Image width | int | imageWidth | 128 | |
1 | Image height | int | imageHeight | 128 | |
2 | Levels (for inverse) | int | levels | 256 |
Num | Type | Name | Initial Value | Description |
---|---|---|---|---|
0 | int | widthOffset | 0 | |
1 | int | heightOffset | 0 | |
2 | int | createImageFlag | 1 | |
3 | dsp_floatMatrix_Pt | matrix_P | ||
4 | int | done | 0 | |
5 | int | ibufs |
int no_samples; int i,j,k; float temp; dsp_floatMatrix_t matrix; dsp_floatMatrix_Pt subMatrix_P; int pwidth; int pheight; float** mat_PP; image_t img; dsp_floatMatrix_Pt Dsp_SubMatrix(); |
---|
/* * get number of input buffers */ if((ibufs = NO_INPUT_BUFFERS()) <= 0) { fprintf(stderr,"imgbuild: no inputs connected\n"); return(2); } SET_CELL_SIZE_OUT(0,sizeof(image_t)); for(i=0; i |
---|
/* * collect the images */ for (no_samples = MIN_AVAIL(); no_samples > 0; --no_samples) { /* * Create the image if necessary */ if(createImageFlag) { matrix_P= Dsp_AllocateMatrix(imageWidth,imageHeight); if(matrix_P == NULL) { fprintf(stderr,"imgbuild: allocation failure\n"); return(4); } createImageFlag=0; done=0; heightOffset=0; widthOffset=0; } /* * get images */ IT_IN(0); img=INIMAGE(0,0); pheight=img.height; pwidth=img.width; mat_PP=img.image_PP; /* * copy inputted image into image */ for(k=heightOffset; k |
---|
/* Capsim (r) Text Mode Kernel (TMK) Star Library (Blocks) Copyright (C) 1989-2017 Silicon DSP Corporation This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA http://www.silicondsp.com Silicon DSP Corporation Las Vegas, Nevada */ |
---|
/* imgbuild.s */ /*********************************************************************** imgbuild() ************************************************************************ This star inputs a sequence of images and creates a larger image with the inputted images forming subimages from left to right top to bottom. When the height (specified as a parameter) is exceeded the inputted images wrap around. After the sub images are all gathered, the image is output. |
---|