Huffman code in Image processing

huffman code in Image processing....
How to implement Huffman code in a VI
using I/P from Histogram.........means probablity

Hello  Balu Malvatu          ,
The inbound function module will  have its own logical unit or work
you don't need to have a extra commit
OR
else you can do is if call the bapi within a ZEE function moduele ( Update  ) within it you will call the bapi and commit
you will call this zee function module with addition STARTING A NEW TASK.
hope it helps,
Anup

Similar Messages

  • Image Processing in C#

    What I want to do is as in the following.
    1. Load image from jpg/bmp file and display on the PictureBox or any other image control keeping image ratio
    2. Perform Image Processing, for example, zoom in/zoom out, change brightness/contrast
    Does any .NET class supports this? or should I implement it with my own code?
    If I should make my own code, is the PictureBox optimal control?

    Hmm.  If you don't know where to start then maybe the do-it-yourself approach is not going to work for you.
    Here's code for a simple control you can use to display an image with a transform matrix and a color matrix.
    using System;
    using System.Drawing;
    using System.Drawing.Drawing2D;
    using System.Drawing.Imaging;
    using System.Windows.Forms;
    class ImageControl : Control
    public Image Image
    get
    return image;
    set
    image = value;
    Invalidate();
    private Image image;
    public Matrix Transform
    get
    return transform;
    set
    transform = value;
    Invalidate();
    private Matrix transform = new Matrix();
    public ColorMatrix ColorMatrix
    get
    return colorMatrix;
    set
    colorMatrix = value;
    Invalidate();
    private ColorMatrix colorMatrix = new ColorMatrix();
    protected override void OnResize( EventArgs e )
    Invalidate();
    public ImageControl()
    this.DoubleBuffered = true;
    protected override void OnPaint( PaintEventArgs e )
    if( image == null ) return;
    e.Graphics.ResetTransform();
    e.Graphics.Transform = transform;
    ImageAttributes imageAttributes = new ImageAttributes();
    imageAttributes.SetColorMatrix(
    colorMatrix,
    ColorMatrixFlag.Default,
    ColorAdjustType.Bitmap );
    e.Graphics.DrawImage(
    image,
    new Rectangle( 0, 0, image.Width, image.Height),
    0, 0, image.Width, image.Height,
    GraphicsUnit.Pixel,
    imageAttributes );
    You can set a transformation matrix to do the zooming, panning, etc.  And set a color matrix to do simple contrast brightness adjustments.
    // Some example matrices
    float[][] colorMatrixElements = {
    new float[] {2, 0, 0, 0, 0}, // red scaling factor of 2
    new float[] {0, 1, 0, 0, 0}, // green scaling factor of 1
    new float[] {0, 0, 1, 0, 0}, // blue scaling factor of 1
    new float[] {0, 0, 0, 1, 0}, // alpha scaling factor of 1
    new float[] {.2f, .2f, .2f, 0, 1}}; // three translations of 0.2
    ColorMatrix colorMatrix = new ColorMatrix( colorMatrixElements );
    Matrix transform = new Matrix(
    1.5f, 0.0f, // horizontal scale of 1.5, 0
    0.0f, 0.5f, // 0, vertical scale of 0.5
    20.0f, 40.0f, // horizontal offset of 20, vertical offset of 40
    Contrast and brightness are performed together in a single matrix.  Contrast scales the output range and brightness is the offset.
    Zooming is just scale and offset.

  • Image Processing Performance Issue | JAI

    I am processing TIFF images to generate several JPG files out of it after applying image processing on it.
    Following are the transformations applied:
    1. Read TIFF image from disk. The tiff is available in form of a PlanarImage object
    2. Scaling
         /* Following is the code snippet */
         PlanarImage origImg;
         ParameterBlock pb = new ParameterBlock();
         pb.addSource(origImg);
         pb.add(scaleX);
         pb.add(scaleY);
         pb.add(0.0f);
         pb.add(0.0f);
         pb.add(Interpolation.getInstance(Interpolation.INTERP_BILINEAR));
         PlanarImage scaledImage = JAI.create("scale", pb);3. Convertion of planar image to buffered image. This operation is done because we need a buffered image.
         /* Following is the code snippet used */
         bufferedImage = planarImage.getAsBufferedImage();4. Cropping
         /* Following is the code snippet used */
         bufferedImage = bufferedImage.getSubimage(artcleX, artcleY, 302, 70);The performance bottle neck in the above algorithm is step 3 where we convert the planar image to buffered image before carrying out cropping.
    The operation typically takes about 1120ms to complete and considering the data set I am dealing with this is a very expensive operation. Is there an
    alternate to the above mentioned approach?
    I presume if I can carry out the operation mentioned under step 4 above on a planr image object instead of buffered image, I will be able to save
    considerable processing time as in this case step 3 won't be required. (and that seems like the bottle neck). I have also noticed that the processing
    time of the operation mentioned in step 3 above is proportional to the size of the planar image object.
    Any pointers around this would be appreciated.
    Thanks,
    Anurag
    Edited by: anurag.kapur on Oct 4, 2007 10:17 PM
    Edited by: anurag.kapur on Oct 4, 2007 10:17 PM

    It depends on whether you want to display the data or not.
    PlanarImage (the subclass of all renderedOps) has a method that returns a Graphics object you can use to draw on the image. This allows you to do this like write on an image.
    PlanarImage also has a getAsBufferedImage that will return a copy of the data in a format that can be used to write to Graphics objects. This is used for simply drawing processed images to a display.
    There is also a widget called ImageCanvas (and ScrollingImagePanel) shipped with JAI (although it is not a committed part of the API). These derive from awt.Canvas/Panel and know how to render RenderedImage instances. This may use less copying/memory then getting the data as a BufferedImage and drawing it via a Graphics Object. I can't say for sure though as I have never used them.
    Another way may be to extend JComponent (or another class) and customize it to use calls to PlanarImage/RenderedOp instances directly. This can hep with large tiled images when you only want to display a small portion.
    matfud

  • Image processing algorithms on video frames.

    Hello.
    I am trying to access video frames, one by one, and do image processing on each of them. this practically includes just a comparison of successive video frames to see how much the content is changing so as to detect when the scenes in the video are changing. i am already using a variation of the frame access code by java. i am able to retrieve the individual frames in the 'buffer' format, and i can convert it to .png and save them to hdisk too.
    what i need to know is whether i can use the buffer type itself to do pixel comparisons, or i need to convert it to an image first. any1 with experience in image processing in java will probably have an idea. and if u can suggest a package, or code whatsoever available online which can help me in my image processing demands, i would really appreciate that.
    thanks!

    Hi Greyfox,
    You can calculate a checksum on the bytes in a bufferedImage and keep a hold of it and use it to check against the next image like so:
    try
              raster = buffImg.getWritableTile(buffImg.getWidth(), buffImg.getHeight());
              imgBytes = ((DataBufferByte)raster.getDataBuffer()).getData();
              // Compute CRC-32 checksum           
         checksumEngine.update(imgBytes, 0, imgBytes.length);
         long checksum = checksumEngine.getValue();
         // Check if it's the same as the previous checksum.
         if (checksum == previousImageChecksum)
              isFrozen = true;
              // Do some logging to try and find out why the image is frozen.
              log.debug("--------- ALERT : DUPLICATE IMAGES FOUND ---------");
              log.debug("Checksum comparison. Current = " + checksum + ". Previous = " + previousImageChecksum);           
         else
              // Give the previous checksum the current value so we can use it for the next check.
              previousImageChecksum = checksum;
         catch (Exception e)
              log.error("Error calculating the checksum.", e);
         // The checksum engine can be reused again for a different byte array by calling reset()
         checksumEngine.reset();

  • Image Processing using applet

    hi,
    I am doing my project in java.My project is " Online Image Processing ".
    I did some processing like gray Scale, Invert , Contrast and rotate 90 degree.
    can any one help me for
    1. I vant to rotate Image to 1 degree...
    2. How to get Blure and Sharpen image?
    3. Can i append frames inside applet?
    plz Help me ..

    I did not read the content of the links (To lazy) just found them for you.
    You say that the examples use frames:
    this should not be a problem as the required code is the same.
    Tip:
    How whould you display a image in a frame?
    How whould you display a image in a applet?
    Concentrate on the above 2 and simply change the code accordingly.
    This should be easy also try asking google.

  • Image processing with applets

    Hi
    I need to create a website with several image processing applets on it. however although the applets work locally they will not load at all through a server (i'm a student) my supervisor tells me i cant use an applet to display an image stored on a server. but as applets specifically have getImage methods which must be able to get images from the server i think he is wrong but do not know how to do it.
    Any advice will result in some really great Karma directed your way.
    thanks

    here's the code I use, make special note of the getDocumentBase(), as this request will be a URL based request, rather than a file read
    try {
    img = getImage(getDocumentBase(), "logo.gif");
    }catch(Throwable t) {
    System.out.println("Unable to load logo image",t);
    t.printStackTrace();
    hope this helps

  • Help for a beginner creating a 2d image-processing suite in LabVIEW.

    I am a final year student and currently seeking any advice from experienced engineers with regard to my project.
    The project is to create a LabVIEW based image-processing suite, which would be able to import 2d arrays of data from microscope, plus other information (scaling, date/time, sample info) and perform the following functions:
    Visualisation – 2d & 3d, Cross-section Profile Analysis, Histogram, Fourier Transform, Auto-Correlation, Copy, Print, Save & Export, Colour Palette Edit, Zoom, Manipulate.
    Having not used LabView previously, any examples or information you may have would be of extreme use,
    Thank you in advance for any help you can give me,

    Sam,
    Most of these tools are readily available in LabVIEW when you purchase the IMAQ Vision toolkit. You just need to learn how to use them and set them up. In your case, I would strongly recommend starting with Vision Builder. You can learn how to use a number of these tools, and it may actually be sufficient for your project without writing any code. It can generate LabVIEW code as well, so it would get you started on your program.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Corrupt JPEG: Bad Huffman Code

    Hello
    I've been having intermittent trouble with images going all
    crazy on me. I have Dreamweaver 8 on my Intel based Mac. I
    downloaded the free trial version of CS3 onto my husband's PC and
    when I tried opening the same document on his computer I get
    "Corrupt JPEG File: Bad Huffman code". Does anyone know what this
    means and how do I fix it. This has happened the odd time before.
    Please help!

    quote:
    Originally posted by:
    SnakEyez02
    How are you creating and saving those images?
    I am trying to figure out the same error about the huffman
    code. When i open a page in dreamweaver and get that code the page
    is a pixelated and discolored like they colors are layered very
    hard to describe ...

  • Why is my image processing time additive when I have it spread to seperate timed structures on a quad-core realtime desktop computer?

    I am developing a vision application on a quad-core realtime desktop computer and 2 NI-1430 boards.  There are 3 cameras.  Each has its own timed structure loop with its own cpu core.  We generated the image processing vi's with Vision Assistant.  I expected the image processing for each camera to happen in parallel, but the total elapsed time is the same as if the image processing was serial.
    Are the Vision Assistant generated vi's not designed for this?  Do I have to set some properties to facilitate multi-core processing? For example, do the shared lower-level vi's have to declared re-entrant?

    Hey arnieb,
    It would be interesting to see your code in 'parallel mode' as opposed to 'serial mode.' In 'serial mode' are you processing the image from one camera and then the other? So, do you actually wire error wires (or other form of execution order control) connecting the processing code from one camera to the processing code of another? How does the processing time of your code compare to processing images from a single camera?
    Hope this helps.
    -Ben
    WaterlooLabs

  • Image processing with imaq vision with 2 webcams on the same computer

    Hi,
    I'm currently trying to set up 2 usb webcams (logitech quickcam for notebooks pro). I want to be able to have them both run simultaneously and do some image processing with the images that I get from both cameras with labview and imaq vision.
    As of right now, I'm having trouble getting both cameras to run at the same time. Any help would be gladly appreciated. Thanks.

    The USB IMAQ driver will not support running 2 USB cameras at a time (I believe it is a limitation of the DirectShow interface). You could open one camera, acuqire an image, close the reference to that camera and then do the same for the second camera.
    If you need simultaneous acquisition, look at possibly moving to 1394 cameras or analog cameras.

  • Image processing

    Sir,
       I am a beginner in LAB View am using labview 2013.i want to do image recognition using labview.can you please give me some basic programs on image processing and image recognition so that  i can understand atleast image acquisition and processing.i have only lab view software sir.should i download any other software for image processing? if so which software and is it free?please give me the link also sir.please help.
                         thank you.

    Hi,
    you can use LabVIEW to do image recognition. Here is an example of the basic functions to do so. You can also search some examples with the Example Finder.
    This little program looks for an image in a folder. He analyses each picture, and makes a comparision between the searched picture and the pictures in the folder.
    I hope it will help
    Giuliano Franchetto
    Student at the l'Ecole Nationale Supérieure des Mines de Saint-Etienne, cycle ISMIN (FRANCE)
    Attachments:
    img recognition.zip ‏43 KB

  • Image Processing in Bridge lost PSD originals HELP!

    I am somewhat new to using Adobe Bridge CS4 super frequently, I have been processing batches of images mostly using the 'Image Process' function under tools>photoshop>image processing. I was using it to watermark my photos and size them down. It worked great, did everything I wanted it too and made it's own JPEG folder with all my processed images. HOWEVER I just discovered that when I process them it is somehow is taking the original image and flattening it so it looks like a JPEG even though the file still thinks it's a PSD file. The size is small and all the layers are gone, basically it looks EXACTLY like the JPEG file I'd just made but it's the original file and it's still a PSD (in theory!). I've been racking my brain trying to figure out when I'm doing wrong here! Been all over the internet trying to find a similar situation and I've had no luck. Any thoughts? I'd really appreciate the help. These particular photos are ready to go to print, but I've got my watermark on them and can't exactly remove the layer that isn't there anymore! HELP
    Oona

    Yes I was converting images from PSD to JPEG with the image processing but I was running an action (within the same dialog box) to make the file sizes much smaller for easy upload to the web? Does running an action affect the original as well as the processed images?

  • Image Processing in Java (E-Book) Request

    Can anyone post the links for this e-book
    i think this e-book is helpful.so,iam requesting all of you.
    Image Processing in Java
    by Douglas A. Lyon
    Publisher: Prentice Hall PTR; Bk&CD-Rom edition (March 1, 1999)
    Language: English
    ISBN: 0139745777

    Check ebay, amazon or your local seller for a copy. Or if you want a free copy, write the author (maybe he's a generous fellow), but don't bother people on this forum with posts like this.
    - Travis

  • Image processing over wireless

    Hi,
    One of our subsidaries has a setup where continuous video stream is generated from certain application servers processing real time image processing.
    The setup goes this way; 3 PC's which run these image processing & are connected to a 3750G switch.
    This switch is uplinked to an access point which then carries all these over wireless to the image processing main server.
    About two weeks ago, when they tested this ,all 3 PC's had issues running together when operators viewed/worked upon the images on them.
    When either one or two of them is turned off, the rest works fine with no disturbance( intermediate stop & start of images ).
    Please help with suggestions on what could be the cause. I suspect bandwidth, but since this doesn't cover any WAN links, i doubt that bandwidth is actually the problem.
    Thanks in advance.

    It depends. QoS will help if your having congestion on the wired side. WMM QoS will help for over the air. I would look at the switch port and see if you see drops on both the map and rap side. You might just be over utilizing the backhaul. Remember that it is half duplex link so that can be an issue also. I had an install with regular AP's and 3gb video uploads within 30 minutes and the only way to achieve that is only allowing 4-5 clients per AP. the testing you have done seems to show that the max you can do over that link is 2. How much other traffic is using the wireless. Maybe try to isolate those traffic on a separate RAP/MAP pair using AP Groups.
    Sent from Cisco Technical Support iPhone App

  • Image processing from .txt file onto an intensity graph

    I am doing a mini project in my class and I was wondering if anyone could help me. It about image processing but I am bit stuck.
    Heres the idea:
    "An image is really nothing more than a 2D array of data. The value of every element in the array corresponds to the brightness of the image at that point.
    In this project you will create a VI which loads a 2D array of data and then displays it on the screen using the Intensity Graph. Three example files (boats.txt, gordon.txt and parrot.txt) are available on the module webpage that you can use. However, you can also use any other black and white image you like, but will need to convert it to a “text image” first. To do this you can use some software called “ImageJ” which is available on the computers and is free to download.
    You can vary the brightness of an image by adding the same value to every element in the array.
    The contrast of an image is adjusted by multiplying every element in the array by the same value. Using numerical controls and simple array mathematics, you should adjust the brightness and contrast of your displayed image.
    Some other ideas that you could try with image manipulation are:
    o Invert an image (change black to white and white to black)"
    First I am having problems putting my picture onto the graph. It is in the write file but the colours are not correct and the image has rotated 90 degrees. I will upload my VI so far when I get back onto my computer.
    Would really appricate the help! Thank you for reading

    Hi charlthedancer,
    Here is an example to get you started.
    Kind regards,
    GajanS
    Attachments:
    Test.vi ‏14 KB

Maybe you are looking for

  • Replacement Path: Replacement with a Variable Value

    How I can show the value of a variable entered by the user in the description of the column in the report? X and Y are variables entered by the user and reflect the lower limits of the range for count documents Example Table                          

  • How to retrieve the username of the logged in user

    Hi, I've been looking for a possibility retrieve some user data like the username of the currently logged in user since yesterday but could not find anything proper. I'm relatively new to APEX. Could someone perhaps point me to an easy-to-understand

  • File keeps downloading on my home page,rpc-1.html

    when I log onto comcast, it keeps downloading a file. (file:///C:/users/tina/AppaData/LocalTemp?rpc-1.html. how do I stop it

  • Rman oracle 8i and tsm solaris 8

    HI all, i have a sun solaris machine with oracle 8i an tsm test software. I have made a policy for three different incremental backup 0/start month 1/sunday 2/every day. Then a i have made a script that check the obsolete backup with report obsolete

  • Execution of a batch file fails if the batch file has a date

    Hi All, I have a batch file which copies files from one folder to another based on the date condition( if the files are modified or created today copy them). Below is my code set curr_date=%DATE:~4,2%/%DATE:~7,2%/%DATE:~10,4% & XCOPY \\cambosnapp01\F