Capturing pixels within area

Hi,
It's been a while since I've played with graphics in Java, and there seem like some great advances in Java2D for things which I had to do manually the last time I was playing.
Anyway, for a project I'd like to revive, I want to be able to be able to calculate things like the average R,G,B, alpha etc values for all pixels within an arbitrary area. The area won't necessarily be any particular shape, i.e. it could be the intersection between a circle and a triangle, for example, where perhaps the two shapes were java.awt.geom.Area objects to begin with. I can visualize how to do this in the "machine-crippling" way, but given the Java2D samples I've seen (especially the masking effects etc), I'm sure there must be a clever way to do it.
Any ideas?
cheers,
Ian

if you look for something top-level: http://java.sun.com/products/java-media/jai/

Similar Messages

  • When I export photos from Aperture, the pixel dimensions are halved thus losing data.  I have set the export preferences to export at original size, to no avail.  This happens even if I just drag to the desktop and then back, or if I export into my iphoto

    When I export photos from Aperture to desktop or iphoto I lose pixels.  The pixel dimensions are halved, despite setting the export preference to export at original size.  Anyone know why or how to correct this?

    Dragging an Image from Aperture exports the Preview.  Preview parameters are set on the Previews tab of Aperture preferences.
    Are you seeing the same results when you export using one of the export commands?
    Is so, confirm that the settings in the selected Image Export Preset ("Aperture➞Presets➞Image Export") truly represent those in the Image Export Preset's name.
    HTH,
    --Kirby.

  • The current capture scratch drives are too full

    I just downloaded this software on my Mac and I am captuing HD video from a Mini HDDV tape camera. I got a error message half way while captuing video
    "the current capture scratch drives are too full. Please remove files from these drives or select a new capture scratch location."
    How can I move forward with capturing video?

    I just downloaded this software on my Mac
    How so?  Final Cut Express has never been downloadable and was discontinued over 18 months ago.  Are you sure you didn't actually download Final Cut Pro X?
    Also, it will help us to know exactly what model Mac you are using, what version of OS X, version of FCE and make/model camcorder you are using.

  • Capture pixels from incoming NetStream.

    Hi
    I am using Action script 2.0, Flash CS4. Flash Media Server.
    Working on windows 7.
    I have read this tutorial.
    http://www.adobe.com/devnet/flash/articles/webcam_motion.html
    Its all working fine. I can put Pixel Effects on My Video Panel and it works fine when I broadcast my video using my web cam.
    I want to implement same effect on the Incoming NetStream. But when I try to implement same effects on incoming NetStream it throws Security Error that
    Connection to rtmp://localhost/videochat halted - not permitted from file:///D|/xampp/xampp/htdocs/MIKE/Test/clientAS2/videochat.swf
    I wonder why I can not capture pixels information using BitmapData for incoming NetStream ??
    is there anybody who worked on it .. or any information on it ..Or any alternative on it ... ??
    Thanks in advance
    Inderd

    come on somebody reply on it .. 

  • Location of video captured from within iMovie?

    When capturing video directly from iMovie using the built in iSight in my macbook Pro, where are the video files saved on the mac?
    Thanks.

    I knew about the project file, though I was not sure if the actual video media was embedded within it.
    This project does not have any imports, it was used to capture new video.

  • Application capture, but colors are off

    Hi all, someone in my group is doing an application capture
    and the screen is coming out blocked in black and pixellated, any
    thoughts?

    Not enough information, jono54. Sorry, but ...
    1) Are the black areas seen on full-motion slides, or on
    static backgrounds?
    2) What color depth is the
    recording PC set to, as in 8bit, 16bit, 32bit color?
    3) What kind of graphics adapter is being used in the
    recording PC?
    As you can tell, aside from the possibility of a full-motion
    (FM) issue, I'm leaning toward the problem being with the graphics
    hardware - or software - on the machine doing the recording ...
    Thanks for more information ...
    Larry

  • How can I rasterize a spot color file without creating "border" pixels between areas that are adjacent to each other but should not be overlapping?

    We use Illustrator to create circuit layouts. For part of our process, we create an image of all of the layers using spot colors to show the printed layers overlapping each other. We then rasterize the file and send the image through a Matlab routine that performs some analysis of the circuits based on the colors of the pixels.
    In some cases, I have created images with areas next to each other, but not overlapping. When rasterizing the image, the rasterizing process appears to treat the borders as overlapping and creates a single pixel wide border between the 2 areas when there is none. This is playing havoc with our Matlab routine.
    I can manually go in and remove the rasterized border, however on some projects, this is a very lengthy process. Has anyone experienced anything like this, or have any ideas on how to prevent this?

    Would align to pixel grid help?
    Left is not aligned, Right is aligned to pixel grid

  • Capturing pixels from a selected part of an image

    Im writing a tool to allow a user to drag a rectangle over any area of an image (contained on a ScrollingImagePanel) in order to perform an operation such as blur on the region.
    When I have the co-ordinates of the rectangular area for the operation, how do I save the pixels to any sort of image object i.e a PlanerImage for manipulation?
    Thanks

    I'm developing a tool where one of the features is the one you describe. I haven't got it working yet, but I'm currently checking out createScreenCapture in java.awt.Robot. It creates a BufferedImage containing pixels from the screen. Might be what we're looking for :).

  • Onlocation captured  mpg 's are corrupted when import in premiere pro

    Oke, yesterday i made this really sweet time lapse recording in Adobe Onlocation CS3. In Adobe Onlocation I can view the recordings 30sec each and there really good. Now I followed the instructions and ejected the clips, but now that I've imported them into Premier Pro CS4, they cant play and there only 1 frame long? How can I fix this?

    Are you recording HDV in .mpeg format? If so, On Location CS3 never recorded HDV .mpegs correctly for me. I had to use .m2t instead. I have no idea why (especially since Premiere's HDV capture is *.mpeg) but it just is...
    JP

  • Capture screen selection area

    Hi friends
         I want to capture a screen selection area(mouse selection) as a image Bitmap data.......I know i can select Bitmap from a image or a component. I want to select it regardless of component area or image........How to do it.... please help
    Regards,
    Leslie

    Use BitmapData.draw from the root or systemManager and set up the
    coordinates correctly.

  • FireWire Capture Pixel Size

    I can capture BetaSP at work through a Kona system, but at home I only have FireWire. When I capture from MiniDV at home (consumer cam), I choose the DV 720x480 setup. When I open these clips in QuickTime player, they come up smaller:
    Format: DV, 720 x 480 (640 x 480), Millions
    FPS: 30.06
    Data Rate: 28.77 mbits/sec
    Normal Size: 640 x 480
    My Beta capture looks like:
    Format: DV, 720 x 480 (640 x 480), Millions
    FPS: 29.98
    Data Rate: 28.77 mbits/sec
    Normal Size: 720 x 480
    It appears to show up fine in FCP, but do I need to change something? FYI, this is for cable TV. Thanks for any tips.
    --Alex

    Ignore the QT player. Look at the clips info within FCP - it will give the true story.
    However, you do want to be sure the DV capture is NOT running at 30.06fps. Sonys and Canons have been noted for doing this on occassion.
    good luck.
    x

  • Pixel counts are wrong

    Aperture versus Lightroom
    Been comparing he two and came across this incidentally:
    the pixel size as reported by Lightroom matches the camera manual's (E500)information for a RAW photo 3264X2448
    Aperture's is reported as larger 3320X2488.
    The discrepancy is accountable by what?
    Sorry if this topic is already posted but of course there's been no search option for a few days now.

    The camera sensors are generally bigger than the stated pixel size, and the extra information is included in the RAW file. Adobe (and several other apps) simply make a decision to extract an image that is the same size as the JPEG images for the sake of consistency. So no, there isn't really a right or wrong.
    You can often see this when looking at the manufacturer's specifications, for instance the Canon 5D has a ~13.3MP sensor, but produces ~12.8MP images.
    Ian
    P.S. As always, if you aren't happy with it, make sure to say so via the official feedback form: http://www.apple.com/feedback/aperture.html

  • How can I Copy/paste the pixels within a frame in a video layer to another frame? (It duplicates the whole frame instead.)

    I'm making a handdrawn animation in the timeline using video layers, so each video layer contains the frames for the animation. The method works great..except for this -
    If lasso select a section of one frame and try to paste into another frame, it duplicates the the whole frame and pastes it with an arbitrary long frame duration for some reason (not the same duration as the frame its copied from)....not at all what I'm trying to do. Any work around? I've tried all the variations of 'paste special' to no avail.
    Thanks.

    Images and other object can either be floating or be inline. Yours are floating and will not move with the text. Inline object will move with the text but can't be outside the text layer. It doesn't help if you have created section in the document. Floating images doesn't care. Nor will it help if you create several documents that you want to merge later. Doesn't make any difference.
    My suggestion is that until your text is finished you have the images inline. Then as a last editing you can start make the images floating and move them a little.

  • Video Capture Filter Properties are not being save...

    So basicaly like I said in the title, I have to manualy go in to options and change all the settings so that the image from the camera is not to bright or too dark.
    Is there any way I could make this options get saved so next time I boot computer they are as I left them before?
    I have attached a helping screenshot below to better show what options I am talking about.
    Solved!
    Go to Solution.
    Attachments:
    problem.png ‏330 KB

    That's a feature or your camera drivers and not Skype.  You'd have to contact the maker of the camera/computer to see if there are drivers or additional software that will keep those settings past a reboot.  It's rather commonplace for camera settings for camera hardware (non-virtual) to reset after a reboot. 

  • How can i color the pixels that are only in the area of the rectangle i'm drawing on the picturebox1 ?

    In the form i have picturebox mouse down event:
    bool DrawIt = false;
    private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
    timer1.Stop();
    LoadPictureAt(trackBar1.Value, sender);
    pictureBox1.Refresh();
    if (e.Button == MouseButtons.Left)
    rect = new Rectangle(e.X, e.Y, 0, 0);
    DrawIt = true;
    pictureBox1.Refresh();
    rect is a global Rectangle variable.
    The the picturebox mouse move event:
    List<Point> NewPoints = new List<Point>();
    private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
    if (e.Button == System.Windows.Forms.MouseButtons.Left)
    if (DrawIt == true)
    rect = new Rectangle(rect.Left, rect.Top, Math.Min(e.X - rect.Left, pictureBox1.ClientRectangle.Width - rect.Left), Math.Min(e.Y - rect.Top, pictureBox1.ClientRectangle.Height - rect.Top));
    NewPoints.Add(e.Location);
    pictureBox1.Refresh();
    In the mouse move event i'm drawing the rectangle i didn't check it yet but in the move event i want to draw the rectangle in real time on the picturebox1.
    Then the paint event:
    private void pictureBox1_Paint(object sender, PaintEventArgs e)
    if (cloudPoints != null)
    if (DrawIt)
    CloudEnteringAlert.pointtocolorinrectangle = cloudPoints;
    Bitmap bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height, PixelFormat.Format32bppArgb);
    CloudEnteringAlert.Paint(e.Graphics, 1, 200, bmp);
    First in the paint event how do i use the rect to draw the rectangle ?
    Second cloudPoints contain all the pixels in the pictureBox1 Image. Could be 44000 or 400.
    cloudPoints is a List<Point>  For example in cloudPoints index 0 i have a coordinate x = 100 y = 200 of a pixel.
    Then i send the pixels coordinates to another class with Paint method and color the pixels in yellow.
    But instead sending all the pixels coordinates in ccloudPoints i want to send to the paint event only the pixels coordinates from cloudPoints that exist inside the rectangle i was drawing. Only the pixels in the rectangle i was drawing.
    So in the end the List<Point> pointtocolorinrectangle will contain only the pixels coordinates exist in the rectangle i was drawing.
    1. How to fix the code in the move event ?
    2. How to change the code in the paint event so it will send coordinates of pixels only that exist in the drawn rectangle.

    I did it this way:
    bool DrawIt = false;
    private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
    timer1.Stop();
    LoadPictureAt(trackBar1.Value, sender);
    pictureBox1.Refresh();
    if (e.Button == MouseButtons.Left)
    rect = new Rectangle(e.X, e.Y, 0, 0);
    DrawIt = true;
    pictureBox1.Refresh();
    List<Point> NewPoints = new List<Point>();
    private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
    if (e.Button == System.Windows.Forms.MouseButtons.Left)
    if (DrawIt == true)
    rect = new Rectangle(rect.Left, rect.Top, Math.Min(e.X - rect.Left, pictureBox1.ClientRectangle.Width - rect.Left), Math.Min(e.Y - rect.Top, pictureBox1.ClientRectangle.Height - rect.Top));
    NewPoints.Add(e.Location);
    pictureBox1.Refresh();
    private void pictureBox1_Paint(object sender, PaintEventArgs e)
    if (cloudPoints != null)
    if (DrawIt)
    e.Graphics.DrawRectangle(pen, rect);
    var pointsAffected = cloudPoints.Where(pt => rect.Contains(pt));
    CloudEnteringAlert.pointtocolorinrectangle = pointsAffected.ToList();
    Bitmap bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height, PixelFormat.Format32bppArgb);
    CloudEnteringAlert.Paint(e.Graphics, 1, 200, bmp);
    Working perfect just what i needed.

Maybe you are looking for

  • HT1369 My Ipod account is saying that my ipod is synced to a differnt account, please help.

    Hi there. I have been having trouble with my Ipod nano. It was working great for the first few months, and it was simple to download, and sync songs to it. But it suddenly began to say that my ipod was synced to another account. I have tried to run t

  • Burning cds

    I cant seem to burn cds from Itunes. I get and error with the number 2131 and it ejects the cd. My computer is authorized so that isn't the issue. Please advise.

  • Solaris 2.6 Revision 11/99

    Hi, Could anyone advise on a supplier for Solaris 2.6 Revision 11/99 (Sparc). This revision is now an end of life product , but we have an urgent requirement for it. Thanks in advance Nigel Gladstone.

  • Source Data file format for FDM

    Hi, I am new in FDM and have couple of question on data loading.. We are using FDM to load the data in Essbase. Please help me on these- Question 1: In source data file, suppose, we have around 300 account members and around 100 PO numbers. There are

  • Bridge for mac download not working

    Hi, I'm trying to load Bridge for mac, it downloads and everything goes fine until it opens the program and then it quits giving the error message 'Sony Bridge For Mac has quit unexpectantly'. I have a new xperia sp and I want to get my music from my