Tag: compiler optimization

如何在Bloodshed Dev-C ++中增加堆栈大小?

我们在一个图像处理项目中使用Blodshed Dev-C ++。 我们正在video帧上实现连接组件标签。 我们必须使用一个递归函数,它会多次递归,我们得到一个stackoverflow。 我们怎样才能拥有更大的堆栈大小? 是否可以通过一些链接器参数或类似的东西来改变它? void componentLabel(int i,int j,IplImage *img){ // blueFrame = img->imageData[i*3*width+j*3]; // greenFrame = img->imageData[i*3*width+j*3+1]; // redFrame = img->imageData[i*3*width+j*3+2]; if(!( img->imageData[i*3*width+j*3]==0 && img->imageData[i*3*width+j*3+1]==0 && img->imageData[i*3*width+j*3+2]==0 ) ){ //printf(“iffffff aq\n”); return; } else{ //printf(“else aq %d\n”,sayac_label); img->imageData[i*3*width+j*3]=1; new_object.pixel_count=new_object.pixel_count+1; new_object.total_row=new_object.total_row+i; new_object.total_col=new_object.total_col+j; if(j0 ){ componentLabel(i,j-1,img); } if(inew_object.bottom.satir){ new_object.bottom.satir=i; new_object.bottom.sutun=j; } componentLabel(i+1,j,img); } if(i>0 […]