graphics

Fast Perspective transform in Java Advanced Imaging API

For the needs of my program I have created a facility to distort an image and place it on a map (my program is a map based program). I wrote my own mechanism for placing and distorting the image using three points that are placed on the image, three points that are placed on the map and then what I simply do it create an AffineTransfor...

BlackBerry - how two merge two images

hi i want to merge two images in blackberry. one image is a big image and other image is a small one. position of small image will be define by developer. what are the possible ways can any one help me out it's urgent. thanks ...

Rotating an Image in Silverlight without cropping

I am currently working on a simple Silverlight app that will allow people to upload an image, crop, resize and rotate it and then load it via a webservice to a CMS. Cropping and resizing is done, however rotation is causing some problems. The image gets cropped and is off centre after the rotation. WriteableBitmap wb = new WriteableBit...

How to draw a filled circle in Java?

I have a JPanel with a Grid Layout. In the "cells" of the grid I can put different elements (for example JButtons). There is no problems with that. But now I want to put a filled circle in some of the cells. I also would like to relate an ActionListener with these circles. In more details, if I click the circle it disappears from the cur...

WPF charting/visualization of realtime data

I've been trying to figure out what is the appropriate way to render real-time data as a line graph in WPF. And by real-time I actually mean, data that is being collected from a USB device that generates data at a rate of approximately 40Hz. There are multiple (up to 7) streams of data that I'm reading at 40Hz in an asynchronous fashion....

Reset custom region in winforms using C#

i have removed left portion of a form using graphics path and region command. when i am trying to show group box on removed portion, group box not appeared. how do i show the groupbox on removed region area ?. or how do i reset the region GraphicsPath shape = new GraphicsPath(); shape.AddRectangle(new Rectangle(200, 0, FormWidth, Form...

Quartz compositions created in Snow Leopard (10.6) doesn't work in Leopard (10.5) despite testing in runtime

Hi I have a reasonably advanced (many patches and subpatches) quartz composition that was created in Snow Leopard but doesn't run well (many elements are not rendered) in Leopard. The composition tested OK via Quartz Composer's Test in Runtime option and works fine for both Leopard 32-bits and Leopard 64-bits (menu item "File | Test in...

Draw arrow on line

Hi, I have this code: CGPoint arrowMiddle = CGPointMake((arrowOne.x + arrowTo.x)/2, (arrowOne.y + arrowTo.y)/2); CGPoint arrowLeft = CGPointMake(arrowMiddle.x-40, arrowMiddle.y); CGPoint arrowRight = CGPointMake(arrowMiddle.x, arrowMiddle.y + 40); [arrowPath addLineToScreenPoint:arrowLeft]; [arrowPath addLineToScreenPoint:arrowMiddle...

How to convert image sequences (PNG) into Animation File (gif/mov/others) (iPhone) ?

I have a sequence of images (PNG format) in my iphone app. It is saved in the app's sandbox doc folder. How do I create animation file from these images? I would prefer animated gif, but other types like video (mov/avi/etc) is ok too. I don't need audio. Just images. Thanks. ...

Ray Generation Inconsistency

I have written code that generates a ray from the "eye" of the camera to the viewing plane some distance away from the camera's eye: R3Ray ConstructRayThroughPixel(...) { R3Point p; double increments_x = (lr.X() - ul.X())/(double)width; double increments_y = (ul.Y() - lr.Y())/(double)height; p.SetX( ul.X() + ((double)i_pos+0.5)...

How does Content-Aware fill work?

In the upcoming version of Photoshop there is a feature called Content-Aware fill. This feature will fill a selection of an image based on the surrounding image - to the point it can generate bushes and clouds while being seamless with the surrounding image. See http://www.youtube.com/watch?v=NH0aEp1oDOI for a preview of the Photoshop ...

Converting between square and rectangular pixel co-ordinates

I'm new at using transforms and this type of math, and would appreciate some direction solving my coding problem. I'm writing in XCode for the iphone, and am working with CGraphics. Problem: In Xcode, I want to draw curves, lines and so on it's screen of of square pixels. Then convert those points, as close as possible, into non...

C# WinForms problem with draw image

Hi I have this class: class OriginalImage: Form { private Image image; private PictureBox pb; public OriginalImage() { pb = new PictureBox {SizeMode = PictureBoxSizeMode.CenterImage}; pb.SizeMode = PictureBoxSizeMode.StretchImage; Controls.Add(pb); image = Image.FromFile(@"Image/origina...

Delete rectangle using .NET?

Can I delete the old rectangle which I have drawn and draw a new rectangle? private void panel1_MouseClick(object sender, MouseEventArgs e) { Graphics g = this.panel1.CreateGraphics(); Pen pen = new Pen(Color.Black, 2); g.DrawRectangle(pen, 100,100, 100, 200); g.dispose(); } ...

How to extract channel POD-type from a boost::gil homogeneous pixel type ?

I have a class templated on <PIXEL>, assumed to be one of boost::gil's pixel types (for now, only either gray8_pixel_t or gray16_pixel_t, and I only expect to support homogeneous pixel types e.g rgb8_pixel_t in future). The class needs to get hold of unsigned char or unsigned short as appropriate to the pixel type; I assume this is buri...

How to set a Transparent Background of JPanel

Hi, I need to know if a JPanel`s bacground can be set to Transparent? My frame is has two Jpanels Image Panel and Feature Panel, Feature Panel is overlapping Image Panel, the Image Panel is working as a background and it is loading image from a remote Url, now I want to draw shaps on Feature Panel , but now Image Panel cannot be seen d...

Loading only part of a bitmap file in Android

Hi all, I would like to load a cropped version of a bitmap image into a Bitmap object, without loading the original bitmap as well. Is this at all possible without writing custom loading routines to handle the raw data? Thanks, Sandor ...

C# GDI Drawing2D help

What GDI methods can I use to draw the blue shape shown in the image below? The center must be transparent. ...

graphics don't draw when loop condition is dates. c#, winForms

so i got this piece of code. (currPosX is defined earlier) while (earliestDate < DateTime.Today) { currPosX = currPosX + 5; e.Graphics.DrawLine(Pens.Black, currPosX, 0, currPosX, 10); earliestDate = earliestDate.AddDays(1); } the graphics don't draw. it's really weird, since this on...

Metric 3d reconstruction

I'm trying to reconstruct 3D points from 2D image correspondences. My camera is calibrated. The test images are of a checkered cube and correspondences are hand picked. Radial distortion is removed. After triangulation the construction seems to be wrong however. The X and Y values seem to be correct, but the Z values are about the same a...