Exemplo n.º 1
0
 void UpdateAttributes(CVImageAttributes attributes)
 {
     FImage.Initialise(attributes);
 }
Exemplo n.º 2
0
 protected virtual void Allocate(CVImageAttributes attributes)
 {
     BufferImage = new Image <Bgr, byte>(attributes.Width, attributes.Height);
 }
		protected virtual void Allocate(CVImageAttributes attributes)
		{
			BufferImage = new Image<Bgr, byte>(attributes.Width, attributes.Height);
		}
Exemplo n.º 4
0
			private void CreateNewPixelPlanesAandB(int w, int h)
			{

				CVImageAttributes cvImageAttributes = new CVImageAttributes();
				cvImageAttributes.ColourFormat = TColorFormat.RGBA8;
				cvImageAttributes.FSize = new Size(w, h);

				imageAandB.Initialise(cvImageAttributes);
				//Log(LogType.Debug, "[CreateNewPixelPlanesAandB(" + w + "," + h + ")] ");

				try
				{
					//GCHandle pinnedImageAData = GCHandle.Alloc(imageA.Data, GCHandleType.Pinned);
					GCHandle pinnedImageAData = GCHandle.Alloc(imageAandB.FrontImage.Data, GCHandleType.Pinned);
					//pixelPlaneA = pinnedImageAData.AddrOfPinnedObject();

					GCHandle pinnedImageBData = GCHandle.Alloc(imageAandB.BackImage.Data, GCHandleType.Pinned);
					//pixelPlaneB = pinnedImageBData.AddrOfPinnedObject();

					pinnedImageAData.Free();
					pinnedImageBData.Free();
				}
				catch (Exception e)
				{
					Log(LogType.Error, "[CreateNewPixelPlanesAandB Exception (pinnedData)] " + e.Message);
					throw e;
				}
			}