• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IImage类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IImage的典型用法代码示例。如果您正苦于以下问题:C# IImage类的具体用法?C# IImage怎么用?C# IImage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IImage类属于命名空间,在下文中一共展示了IImage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CreateInput

 public static ProcessorResult CreateInput(IProcessor pro, IImage src)
 {
     ProcessorResult r = new ProcessorResult();
     r.Result = src == null ? null : src.ToBitmap();
     r.Name = "输入图像";
     return r;
 }
开发者ID:493409332,项目名称:smartimage,代码行数:7,代码来源:IResult.cs


示例2: ConvertIntToFloat

        public static unsafe void ConvertIntToFloat(IImage src, IImage dest)
        {
            int nChannels = src.ColorInfo.NumberOfChannels;
            int elemWidth = src.Width * nChannels;
            int height = src.Height;

            int srcStride = src.Stride;
            int destStride = dest.Stride;

            for (int channel = 0; channel < src.ColorInfo.NumberOfChannels; channel++)
            {
                int* srcPtr = (int*)src.ImageData + channel;
                float* destPtr = (float*)dest.ImageData + channel;

                for (int r = 0; r < height; r++)
                {
                    for (int c = 0; c < elemWidth; c += nChannels)
                    {
                        destPtr[c] = srcPtr[c];
                    }

                    srcPtr += srcStride / sizeof(int);
                    destPtr += destStride / sizeof(float);
                }
            }
        }
开发者ID:remingtonsteel,项目名称:accord-net-extensions,代码行数:26,代码来源:FromIntDepthConverters.cs


示例3: Show

 /// <summary>
 /// Display the histograms of the specific image
 /// </summary>
 /// <param name="image">The image to retrieve hostigram from</param>
 /// <param name="numberOfBins">The numebr of bins in the histogram</param>
 public static void Show(IImage image, int numberOfBins)
 {
     HistogramViewer viewer = new HistogramViewer();
      viewer.HistogramCtrl.GenerateHistograms(image, numberOfBins);
      viewer.HistogramCtrl.Refresh();
      viewer.Show();
 }
开发者ID:TaNeRs,项目名称:SSSS,代码行数:12,代码来源:HistogramViewer.cs


示例4: SavedTreeNode

		public SavedTreeNode(IImage image, string fullname, string text)
			: base(null)
		{
			base.IconImage = image;
			FullName = fullname;
			Text = text;
		}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:7,代码来源:SavedTreeNode.cs


示例5: SetImage

        public void SetImage(IImage image)
        {
            #region display the size of the image
             Size size = image.Size;
             widthTextbox.Text = size.Width.ToString();
             heightTextBox.Text = size.Height.ToString();
             #endregion

             #region display the color type of the image
             Type colorType = Reflection.ReflectIImage.GetTypeOfColor(image);
             Object[] colorAttributes = colorType.GetCustomAttributes(typeof(ColorInfoAttribute), true);
             if (colorAttributes.Length > 0)
             {
            ColorInfoAttribute info = (ColorInfoAttribute)colorAttributes[0];
            typeOfColorTexbox.Text = info.ConversionCodename;
             }
             else
             {
            typeOfColorTexbox.Text = Properties.StringTable.Unknown;
             }

             Type colorDepth = Reflection.ReflectIImage.GetTypeOfDepth(image);
             typeOfDepthTextBox.Text = colorDepth.Name;
             #endregion

             UpdateHistogram();
             UpdateZoomScale();
        }
开发者ID:samuto,项目名称:UnityOpenCV,代码行数:28,代码来源:ImageProperty.cs


示例6: Start

		public override void Start()
		{
			base.Start();

			IStack stack = Platform.Current.Create<IStack>();

			ILabel lblLabel = Platform.Current.Create<ILabel>();
			lblLabel.Text = "View an image from Url";
			lblLabel.Height = 30;
			stack.Children.Add(lblLabel);

			IImageButton imgbtn = Platform.Current.Create<IImageButton>();
			imgbtn.LoadFromUrl(new Uri("http://okhosting.com/wp-content/uploads/2016/02/okhosting-150x150.png"));
			imgbtn.Height = 100;
			imgbtn.Width = 100;
			imgbtn.Click += CmdViewImage_Click;
			stack.Children.Add(imgbtn);

			imgPicture = Platform.Current.Create<IImage>();
			imgPicture.LoadFromUrl(new Uri("http://www.patycantu.com/wp-content/uploads/2014/07/91.jpg"));
			imgPicture.Height = 250;
			imgPicture.Width = 600;
			imgPicture.Visible = false;
			stack.Children.Add(imgPicture);

			IButton cmdClose = Platform.Current.Create<IButton>();
			cmdClose.Text = "Close";
			cmdClose.Click += CmdClose_Click;
			stack.Children.Add(cmdClose);

			Platform.Current.Page.Title = "Test label";
			Platform.Current.Page.Content = stack;
		}
开发者ID:okhosting,项目名称:OKHOSTING.UI,代码行数:33,代码来源:ImageButtonController.cs


示例7: HandleCore

        protected override IImage HandleCore(IImage src)
        {
            throw new NotImplementedException();
            //IImage dst = null;
            //if (src.PixelFormat == System.Drawing.Imaging.PixelFormat.Format8bppIndexed)
            //{
            //    m_filter = new HoughLineTransformation();

            //    if (StepsPerDegree > 10) StepsPerDegree = 10;
            //    else if (StepsPerDegree < 1) StepsPerDegree = 1;

            //    if (LocalPeakRadius > 10) LocalPeakRadius = 10;
            //    else if (LocalPeakRadius < 1) LocalPeakRadius = 1;

            //    m_filter.StepsPerDegree = this.StepsPerDegree;
            //    m_filter.LocalPeakRadius = this.LocalPeakRadius;

            //    m_filter.ProcessImage(src);
            //    WriteHoughLine();
            //    dst = m_filter.ToBitmap();
            //}
            //else
            //{
            //    dst = src.Clone() as Bitmap;
            //}
            //IImage dst;
        }
开发者ID:493409332,项目名称:smartimage,代码行数:27,代码来源:SimpleHoughLineProcessor.cs


示例8: Save

 public void Save(IImage image, IFile file)
 {
     var actual = ((ImageAdapter)image).Image;
     using (var stream = file.Open(FileLockMode.ReadWrite, FileOpenMode.Recreate)) {
         actual.Save(stream, this.codec, this.parameters);
     }
 }
开发者ID:ashmind,项目名称:gallery,代码行数:7,代码来源:ImageCodecAdapter.cs


示例9: Handle

        public IImage Handle(IImage src)
        {
            m_cacheResults.Clear();
            if (src == null) return null;

            if (Enable == true)
            {
                try
                {
                    this.m_inputImage = src;
                    this.m_cacheResults.Add(this.CreateInput(this.m_inputImage));
                    this.m_outputImage = this.HandleCore(src);
                    if (this.m_outputImage != null)
                    {
                        this.m_cacheResults.Add(this.CreateOutput(this.m_outputImage));
                    }
                    return this.m_outputImage;
                }
                catch (Exception ex)
                {
                    this.m_cacheResults.Add(this.CreateExceptionResult(ex));
                    return this.m_outputImage;
                }
                finally
                {
                }
            }
            else return src;
        }
开发者ID:493409332,项目名称:smartimage,代码行数:29,代码来源:BaseProcessor.cs


示例10: HandleCore

 protected override IImage HandleCore(IImage src)
 {
     // Bitmap dst = src.Clone(new Rectangle(0,0,src.Width,src.Height), src.PixelFormat) as Bitmap;
     //			m_filter.ApplyInPlace(dst);
     // return dst;
     throw new NotImplementedException();
 }
开发者ID:493409332,项目名称:smartimage,代码行数:7,代码来源:MedianFilter.cs


示例11: ConvertByteToDouble

        public static unsafe void ConvertByteToDouble(IImage src, IImage dest)
        {
            int nChannels = src.ColorInfo.NumberOfChannels;
            int elemWidth = src.Width * nChannels;
            int height = src.Height;

            int srcStride = src.Stride;
            int destStride = dest.Stride;

            for (int channel = 0; channel < src.ColorInfo.NumberOfChannels; channel++)
            {
                byte* srcPtr = (byte*)src.ImageData + channel;
                double* destPtr = (double*)dest.ImageData + channel;

                for (int r = 0; r < height; r++)
                {
                    for (int c = 0; c < elemWidth; c += nChannels)
                    {
                        destPtr[c] = srcPtr[c];
                    }

                    srcPtr += srcStride / sizeof(byte);
                    destPtr += destStride / sizeof(double);
                }
            }
        }
开发者ID:remingtonsteel,项目名称:accord-net-extensions,代码行数:26,代码来源:FromByteDepthConverters.cs


示例12: Recognize

 public int Recognize(IImage image)
 {
     var discretizedImage = discretizer.Discretize(image);
     var activeNeuron = classifier.Classify(discretizedImage);
     var cluster = mapper.Map(activeNeuron);
     return cluster;
 }
开发者ID:forkbomb,项目名称:pikto,代码行数:7,代码来源:RecognitionPath.cs


示例13: getDefaultSprite

		private static ISprite getDefaultSprite(IImage image, IGraphicsFactory factory)
		{
			ISprite sprite = factory.GetSprite();
			sprite.Image = image;
			sprite.Location = AGSLocation.Empty();
			return sprite;
		}
开发者ID:tzachshabtay,项目名称:MonoAGS,代码行数:7,代码来源:AGSSingleFrameAnimation.cs


示例14: CreateOutput

 public static ProcessorResult CreateOutput(IProcessor pro, IImage output)
 {
     ProcessorResult r = new ProcessorResult();
     r.Result = output == null ? null : output.ToBitmap();
     r.Name = "输出图像";
     return r;
 }
开发者ID:493409332,项目名称:smartimage,代码行数:7,代码来源:IResult.cs


示例15: DrawImage

		public void DrawImage (IImage image, Rect frame, double alpha = 1.0)
		{
			var ch = GetChild (ChildType.Image);
			var s = (Shapes.Rectangle)ch.Shape;
			s.Width = frame.Width;
			s.Height = frame.Height;
		}
开发者ID:michaelstonis,项目名称:NGraphics,代码行数:7,代码来源:CanvasCanvas.cs


示例16: GetTypeOfDepth

 /// <summary>
 /// Get the depth type of the image
 /// </summary>
 /// <param name="image">The image to apply reflection on</param>
 /// <returns>The depth type of the image</returns>
 public static Type GetTypeOfDepth(IImage image)
 {
    return 
       Toolbox
       .GetBaseType(image.GetType(), "Image`2")
       .GetGenericArguments()[1];
 }
开发者ID:Rustemt,项目名称:emgu_openCV,代码行数:12,代码来源:ReflectIImage.cs


示例17: IntHistogram

 public IntHistogram(IImage image, string title, int capacity)
 {
     this.capacity = capacity;
     this.image = image;
     Max = 0;
     Title = title;
 }
开发者ID:sangelov,项目名称:Bliss,代码行数:7,代码来源:IntHistogram.cs


示例18: EventButton

 public EventButton(string text, int count, EventType eventType, IImage icon)
 {
     Count = count;
     Text = text;
     Event = eventType;
     Icon = icon;
 }
开发者ID:xorkrus,项目名称:vk_wm,代码行数:7,代码来源:EventButton.cs


示例19: AddFrame

 /// <summary>
 /// Adds the frame to the animation.
 /// </summary>
 /// <param name="frame">Frame.</param>
 /// <param name="duration">Duration.</param>
 public void AddFrame(IImage frame, int duration)
 {
     lock (this) {
         frames.Add (new AnimFrame(frame, duration));
         totalDuration += duration;
     }
 }
开发者ID:Paludan,项目名称:BeerRun,代码行数:12,代码来源:Animation.cs


示例20: Predict

 /// <summary>
 /// Predict the label of the image
 /// </summary>
 /// <param name="image">The image where prediction will be based on</param>
 /// <returns>The prediction label</returns>
 public PredictionResult Predict(IImage image)
 {
    int label = -1;
    double distance = -1;
    CvInvoke.CvFaceRecognizerPredict(_ptr, image.Ptr, ref label, ref distance);
    return new PredictionResult() { Label = label, Distance = distance };
 }
开发者ID:KaganRoman,项目名称:Eval,代码行数:12,代码来源:FaceRecognizer.cs



注:本文中的IImage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IImageByte类代码示例发布时间:2022-05-24
下一篇:
C# IIdentityInstance类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap