Question Array of bitmap32's ?

Retep

New member
Joined
Jan 3, 2012
Messages
1
Programming Experience
1-3
I would like to create an array of bitmap32's

Reason:
I am trying to turn this delphi into vb.net
images : PArrayOfPBitmap32;

How could I do this?





For a more complete picture:
I am using library called "filters" (found here Filters image processing library) to do some image processing and need to turn a subroutine from delphi to vb and most is easy except some critical things like this array, and what the vb equivalent of ^[] is.
The following code is from here Only the most interesting 'test()' function of FiltersTest - WikiFilters (a little easier to read since this site undoes the formatting :mad: and I might have missed something )

chrono : TChronometer;
i, count : Integer;
timePerRun : Integer;
images : PArrayOfPBitmap32; 'help needed
pointers : PArrayOfPointers;
decision : Integer;
tmpPointer : Pointer;
tmpI : Integer;
tmpBlob : PBlob;
tmpSingle : Single;
tmpBoolean : boolean;
tmpImage : PBitmap32;
tmpImages : ArrayOfPBitmap32;
tmpStr : String;
tmpStrC : array[0..1024] of Char;
x1, y1, x2, y2 : Integer ;
if panelActif=pBlobRepositioning then begin // to test this filter, we need to do somethings preprocessSimulateAngle(imageIn,StrToFloat(txtBlobRepositioningSimulateAngle.Text)); // this function set 'imageSimulateAngle' chrono.Start; setParameterImage(filterBlobRepositioning,'inImage',imageSimulateAngle); setParameterBoolean(filterBlobRepositioning,'monitoring',chkBlobRepositioningMonitoring.Checked);
setParameterInteger(filterBlobRepositioning,'margin', sbBlobRepositioningMargin.Position);
tmpI:=360;
if cbBlobRepositioningVectorhistogramAngleprecision.ItemIndex=1 then tmpI:=720
else if cbBlobRepositioningVectorhistogramAngleprecision.ItemIndex=2 then tmpI:=3600
else if cbBlobRepositioningVectorhistogramAngleprecision.ItemIndex=3 then tmpI:=36000; setParameterInteger(filterBlobRepositioning,'blob_ThresholdBackground',sbBlobRepositioningBlobThreshold.Position); setParameterInteger(filterBlobRepositioning,'blob_AreaMin',StrToInt(txtBlobRepositioningBlobAreaMin.Text)); setParameterInteger(filterBlobRepositioning,'blob_AreaMax',StrToInt(txtBlobRepositioningBlobAreaMax.Text)); setParameterInteger(filterBlobRepositioning,'vectorHistogram_anglePrecision', tmpI);
setParameterInteger(filterBlobRepositioning,'vectorHistogram_smooth', sbBlobRepositioningSmooth.Position); run(filterBlobRepositioning);
chrono.Stop; image1 := getOutputImage(filterBlobRepositioning,'outImage'); imageOut:=image.eraseOrCreateImageLike(imageOut,image1);
image.copyImageToImage(image1,imageOut);
if chkBlobRepositioningMonitoring.Checked=true then begin images := getOutputImages(filterBlobRepositioning,'outImagesMonitoring');
if (images<>nil) and (Length(images^)>0) then begin image2 := images^[cbBlobRepositioningMonitoringView.ItemIndex];
'anyone know what ^[] means? imageOut2:=image.eraseOrCreateImageLike(imageOut2,image2);
image.copyImageToImage(image2,imageOut2);
end;
end; tmpSingle:=getOutputFloat(filterBlobRepositioning,'angleToRestorOrientation');
txtBlobRepositioningComputedAngle.Text := FloatToStrF(tmpSingle,ffFixed,4,1); tmpSingle:=calculAngleError(StrToFloat(txtBlobRepositioningSimulateAngle.Text),blobRepositioningLearnedAngle,getOutputFloat(filterBlobRepositioning,'angleToRestorOrientation'));
txtBlobRepositioningError.Text := FloatToStrF(tmpSingle,ffFixed,4,1);
end else
 
Last edited:
Back
Top