Python Image processing. (Help needed)

Hi all.
I'm currently trying to learn python and have made some(small) progress into the matter.
However, I have an urgent need to extract some information from a bactch of photos for statistical purposes, namely:
- color saturation (red, green, and blue)
- mean luminance
- variance of luminance
- root mean square (RMS) contrast
- kurtosis
- skewness
- energy
Now I've searched for some program that could aid me in this when suddenly I remembered Python.
I thought I could write a little script to extract said information and save it in a file.
This is where I need the help of all you python gurus.
Need a pointer in the right direction. I'm looking into PIL. IS this the best choice? Could this give me all the info need.
To be honest, I don't even know what some of that info is (my wife needs it for here PhD thesis...)
Any help would be appreciated.
Cheers,
P.

palobo wrote:@buttons: Thanks. I am currently looking through that reading. Statisctical info for RGB etc is great, just what I needed. However I can't seem to get info on contast and luminance. I will keep at it.
All I can tell you for sure from a very dim recollection of an undergraduate graphics course is that contrast and luminance can be derived mathematically from RGB somehow.
PIL gives you the option to do pixel by pixel comparisons, so you can certainly get the info you need... the first step would be to define it though. ;-)
Dusty

Similar Messages

  • DESPERATE Image compression help needed!

    Hi,
    im doing image compression techniques for my final year project and desperatly need some code written in java to compress a image file using the huffman code. im using the BufferedImage class to store the image (jpeg) and need a a bit more code to do the huffman coding! i have tried most places on the net, but all they do is describe what it is! not how it is implemented!
    Thanks!

    If you are talking about just huffman coding, then it is pretty easy. However, if you are talking about writing a JPEG compression algorithm, it's not so easy. You have to take into consideration the sampling of Y to Cr and Cb, the quantization values, the huffman tables, headers, # of components, etc...
    Here are some links:
    http://www.cs.sfu.ca/undergrad/CourseMaterials/CMPT479/material/notes/Chap4/Chap4.2/Chap4.2.html
    http://archive.dstc.edu.au/RDU/staff/jane-hunter/video-streaming.html
    http://www.cs.sfu.ca/CourseCentral/365/li/material/notes/Chap3/Chap3.3/Chap3.3.html
    http://memory.loc.gov/ammem/pictel/mddp308.htm
    http://www.faqs.org/faqs/jpeg-faq/
    http://www.webreference.com/dev/graphics/compress.html
    http://vip.cs.utsa.edu/classes/cs1723s2000/robbins/recitations/HuffmanCaseStudy.html
    http://www.compressconsult.com/huffman/
    http://www.wotsit.org/
    http://xarch.tu-graz.ac.at/home/rurban/news/comp.graphics.algorithms/msg00050.html
    http://cvs.bioperl.org/cgi-bin/viewcvs/viewcvs.cgi/biojava-lims/third/JpegEncoder/JpegEncoder.java?cvsroot=biojava&rev=HEAD
    http://www.montefiore.ulg.ac.be/~briquet/imgsvr/JPEG.java
    The last two links provide implementations. I think the last link is probably the simplest
    implementation I've ever seen for JPEG. It works, but it's not great :)

  • Image sequence help needed

    Hi people, first time posting, spent a while researching nobody seems to have covered this as far as i looked. I am dealing with about 1200 images in flash, in sequence, i tried importing the frames all at once and they all came up blank... for some reason they were red up until 315 and then the rest were blank, some were black. People have said that it is likely a ram issue? what the hell? the images total just under a half a gig and i have 8gb of ram, i looked at my processes and flash is only using about 3gb of ram. I tried importing about 100 images at a time, and i got to about 300 and again, the same issue started, after seeing them all work up to 300. I need to be able to take out a frame here or there from a video. I hope i need not exaplin more, the point is i need this image sequence to work, and i need to be able to see all 1200 frames and it simply is not working for me. Any solutions? flash has been driving me nuts lately.

    This is a known limitation in Flash. Do note that the size of the image on the filesystem may say something like half a gig but once you take it into Photoshop you'll see the uncompressed actual size of the image (on the bottom of each window). For example a 52KB JPEG in Photoshop right now states it's 950.2K. I'm assuming your images are probably larger so you can quickly see how this becomes an issue. Open 700 52kb images and you're sitting at 7GB ram, 1GB for the OS and are now in pagefile (HD ram).
    Flash is about being light weight. After Effects would sequence those images like nothing but Flash is not designed like that.
    The solution depends on your needs. Why are you importing 1200 frames individually? If the frames make up a video (or several videos) you should create them in an actual video while saving huge amounts of disk space and processor, while also getting around this Flash limitation.

  • Site linked on facebook has no thumbnail image - Admin. help needed

    hi, after looking thru the forum i've found 3 different posts asking how to make links posted on facebook come up with an appropriate thumbnail image, but none of them have an answer. Is it possible for a site built with iweb to do this, and if so, please tell us how. Thanks

    The only solution is to write a piece of code into the header of the page and that will tell facebook where to pull the title, description and the photo from. The code that needs to be inserted is below.
    THE PROBLEM - this solution doesn't work if you have built your site using iweb. Everyone that has iweb has responded to the solution (everywhere this is written about) has said this.
    Does anyone know another work around?
    The solution for anyone without iweb:
    <meta name="title" content="INSERT CONTENT HERE" />
    <meta name="description" content="INSERT CONTENT HERE" />
    <link rel="image_src" href="INSERT LOCATION OF PHOTO WEB ADDRESS HERE" />

  • Please help - image viewer help needed

    hi
    can anyone plase help
    I am building a CSS site and want a simple image viewer -
    just one image viewing in a box with >> and << buttons
    for the user to scroll through images. I know that dreamweaver has
    a built in Image viewer but it does not work properly. It will not
    go back to the first image after it has gone forward to the next
    images. Even the tutorial does this.
    Does anyone know why this happens or can anyone direct me to
    a good tutorial that will provide instructions for this?
    I know that there are many add ons to deal with this but it
    is only a small function that I should be able to produce myself.
    Many Thanks

    If you're building a CSS site you might not want to use
    Flash. Try Googling
    for "lightbox". If you have a development budget, you might
    also want to
    have a look at this:
    http://www.projectseven.com/products/galleries/ssm/ssm_01.htm
    Al Sparber - PVII
    http://www.projectseven.com
    Extending Dreamweaver - Nav Systems | Galleries | Widgets
    Authors: "42nd Street: Mastering the Art of CSS Design"
    "sarah louise water" <[email protected]>
    wrote in message
    news:fhocso$61t$[email protected]..
    > hi
    > can anyone plase help
    >
    > I am building a CSS site and want a simple image viewer
    - just one image
    > viewing in a box with >> and << buttons for
    the user to scroll through
    > images.
    > I know that dreamweaver has a built in Image viewer but
    it does not work
    > properly. It will not go back to the first image after
    it has gone forward
    > to
    > the next images. Even the tutorial does this.
    >
    > Does anyone know why this happens or can anyone direct
    me to a good
    > tutorial
    > that will provide instructions for this?
    > I know that there are may add ons to deal with this but
    it is only a small
    > function that I should be able to produce myself.
    >
    > Many Thanks
    >

  • Image Selection Help Needed

    Hi
    i am trying to select my inline graphic after it is added to textflow.
    using filerefrence once image is loaded and following funcion is to handle this
    function imageLoadComplete(e:Event):void {
         imgLdr.contentLoaderInfo.removeEventListener(Event.COMPLETE,imageLoadComplete);
         var mc:MovieClip = new MovieClip();
         mc.addChild(imgLdr.content);
         mc.addEventListener(MouseEvent.CLICK,imageClicked);
         EditManager(textFlow.interactionManager).insertInlineGraphic(mc,100,100);
         textFlow.flowComposer.updateAllContainers();
    when i click on image event is called. after click i passed this image to resize handler and here is to resize this. but it handles  image only if cursor is at side of the image or image is selected in a way that it is highlighted. other wise modifyinlinegraphic is not working for me if i pass my movieclip refrence.
    Please help i have spen more than 10 hrs to figure out this problem
    Thanks

    I think most likely the problem is that you are not passing an explicit operationState. That is the last parameter in EditManager.modifyInlineGraphic, and if it is left out, then TLF will use the current selection as the location of the inline graphic. If you want to modify an inline graphic at a particular location, you should create a SelectionState at that location, and pass that as the operationState.
    Suppose the inline is the first thing in the TextFlow. Then you could do this as follows:
         var selectionState:SelectionState = new SelectionState(textFlow, 0, 0);
         IEditManager(textFlow.interactionManager).modifyInlineGraphic("source", 100, 100, null, selectionState);
    Then it should find the inline graphic at the start of the TextFlow, regardless of where the current selection is.
    If this does not sound like the problem you are having, please send a code snippet for the event listener where you call to modifyInlineGraphic.
    - robin

  • Intialization process help needed

    Dear all,
    I am trying to create an intialization process and I have stumbled upon an error which confuses me.
    The scenario is to distribute business partners between B1 2007 A instances.
    The B1iSN version is PL13.
    Here is what I tried.
    - I created a new scenario through Graphical Scenario Design.
    - I modified (through Graphical Scenario Design) the newly created scenario to change ProcessType to "S" and to Classification="I".
    - I manually modified the BizPackageMETA.xml to set isLastStep and isMandatory to "yes" for UIStep 5 in UIStepList.
    - I created and activated an Initialization process in SAP B1iSN Admin Console.
    - After clicking on Initial Load button I received the following error:
    IPO Step:
    /SemStart/com.sap.b1i.datasync.ipo/SemStart/SemStart.ipo/SemStart
    Technical Error:
    com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: com.sap.b1i.bizprocessor.BizProcException: BPE001 Nested exception: com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: java.lang.Exception: com.sap.b1i.xcellerator.XcelleratorException: XCE087 The destination IPO-Step URI for an internal Service-Call is empty!
    I checked the status of SemStart.ipo in SAP B1iP ControlCenter and it's active.
    The IPO-Log for SemStart.ipo shows the above error as long as a the below warning:
    Level  WARNING
    Logger com.sap.b1i.xcellerator
    Class/Method com.sap.b1i.xcellerator.SingleAdapterPool$SingleAdPoolFactory, createItem
    Thread 12035
    XCL034 Error on creation of an Adapter-instance for Adapter SRVC
    Could anyone please help me resolve this issue?
    Thanks in advance,
    Charalampos

    >
    vasu natari wrote:
    > Hi,,
    >
    > I guess there is some problem with the XSL file. Please check it..
    >
    > Vasu Natari.
    Hi,
    Thanks for your reply.
    If the XSL file was wrong, I believe I would get a message in the Message Log in SAP B1iSN Admin Console, but I don't get any messages in the Message Log.
    Kind Regards,
    Charalampos

  • Missing images error. help needed

    Hey,
    Since i had an issue with having iPhoto library on Airport, i moved it back and rebuilt library etc.
    All is fine but there are about five photos that have been lost which is fine.
    I dont mind the loss of these photos, but id like to get rid of these error messages.
    Please see screenshot attached.
    S

    "copy imported items to the iPhoto library" is checked.
    It wasn't when these files were imported.
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.

  • Help Needed..Fingerprint Identification..Image Manipulation

    Norfolk State University Student (Help Needed):
    I'm working on Fingerprint Identification using image correlation and/or a feature-based approach.  First, Goal is to minimize the lines of the minutia so that they are one pixel thick.  What services does Labview offer that will help me accomplish this task??

    Hey Snakehead...,
    Have you tried improving your original image with better lighting, better camera, better lens, etc.? What image processing have you done already, or are you starting from scratch? I agree with AnalogKid in providing some sample images to the forum so we can get an idea of what you are working with. Have you performed any morphology processing on the image? Have you tried edge detection functions? There are numerous functions that NI provides with their NI Vision software that will help you process your image, it is just finding the right combination that is the toughest part. Last, if you do have the Vision software, I might suggest taking a look at the Vision concepts manual to get an idea of the different functions and their capabilities. Let us know what kind of images you are working with and what you have done so far, and last, what you would like to eventually see. Thanks, and have a great day.
    Regards,
    DJ L.

  • I am able to get color images in the continues shot but when i try to snap a color image which i need for my processing i get only a monocrome image

    I have been using lv_vfw.llb VI's for grabbing images from a CREATIVE WEB CAM ,i am able to get color images in the continues shot but when i try to snap a color image which i need for my processing i get only a monocrome image ,i have been trying to play around with the RGB weightings but i am unable to get a color iamge,it shall be of great help if you could help me in doing this as it is urgent for me.Thanks for your help.

    vicky,
    I am unfamiliar with the lv_vfw.llb, and have not used it before. However, I noticed that you stated that you are able to grab in color, just not snap in color. If this is the case, why not just perform a grab and then extract a single buffer from this grabbed data, which would likely be in color? This seems like a possible solution to the issue that you are seeing.
    Other than that, I really don't know enough about the lv_vfw.llb to be of much help on this issue. Hopefully another member of this forum will be able to assist you with this software.
    Regards,
    Jed R.
    Applications Engineer
    National Instruments

  • 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

  • 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?

  • HT5631 how do I verify my apple id? I can't sign in to it in mail and I can't make a new one because it just will not process I'm trying to set up iCloud between iPad and iPhone and having ALOT of difficulty pleAse help need it done by later on today!!!!!

    how do I verify my apple id? I can't sign in to it in mail and I can't make a new one because it just will not process I'm trying to set up iCloud between iPad and iPhone and having ALOT of difficulty pleAse help need it done by later on today!!!!!

    In order to use your Apple ID to create an iCloud account, the primary email address associated with the ID must first be verified.  To do this, Apple will send a verification email to your account and you must respond to the email by clicking the Verify Now link.  Make sure you are check the spam/junk folder as well as the inbox.  If it isn't there, go to https://appleid.apple.com, click Manage your Apple ID, sign in, click on Name, ID and Email addresses on the left, then to the right click Resend under your Primary Email Address to resend the verification email.

  • Help needed placing extra images in my portfolio.

    I like to add some more pictures by my portfoliomap.
    I have now 6 items each page and i like to know if its possible to add some more pictures and how i can do this?
    You can find my site at..
    http://www.dorffdesign.nl/affiches.html

    As you can see on
    http://www.dorffdesign.nl/advertenties.html
    it worked out fine..
    Only the last set off images contait to much space between the set before? Do you know where i can adjust this?
    Regards Brian
    Date: Tue, 17 Apr 2012 09:07:38 -0600
    From: [email protected]
    To: [email protected]
    Subject: Help needed placing extra images in my portfolio.
        Re: Help needed placing extra images in my portfolio.
        created by Altruistic Gramps in Dreamweaver - View the full discussion
    Upload the images to the images folder and use the markup as you have been using in the following, changing the name of the image to suit.
    !images/arcadisch_logo.jpg|alt=|src=images/arcadisch_logo.jpg!
    Gramps
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4340979#4340979
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4340979#4340979. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Dreamweaver by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • I would like to remove a short gray edge from two images. I need help in that I am not yet able to use PhotoShop. Could somebody kindly help me with this?

    I would like to remove a short gray edge from two images. I need help in that I am not yet able to use PhotoShop. Could somebody kindly help me with this?

    I doubt it Doc Maik, but I am certainly happy to learn The image is this one (and a similar one). They would be beautiful portraits if not for the "extra mouth". The grey edge that I would like to remove is the excess of (grey) mouth that is actually my horse's chin, but that in the pictures looks like a wider, looping mouth. Practically, looking at the picture, the "extra mouth" to the left. What I would love it to be able correct that to look like a normal mouth, which means that half of the protruding edge should be removed. I am not sure I was able to explain myself, but here is one of the two pictures. I thank you for you kindness in being available to advise me.

Maybe you are looking for

  • BPM - Message Interface

    Hello all, I have some doubts about Messages Interface used in BPM. BPM just used Abstract Message Interfaces, but to expose the Interface to sender aplication, XI need the same Message Interfaces that is declared abstract but no abstract. My questio

  • Java Install - Uninstall - Error 1723 Problems

    So, Java is nice ... most of the time, but lately, not so much. I wrote [this page|http://panocea.us/JavaBlues/] to document the problem... and maybe, eventually, its solution. OS: Windows 7 Pro 64-bit; Version 6.1.7600 Build 7600 Problem presents it

  • Explanation of code

    Could someone please explain to me what is happening in the code attached (bmp file) A step-by-step runthrough would be of most use Thanks Attachments: BD.bmp ‏497 KB

  • Assistance with upgrade paths?

    I'm planning to upgrade my system/software and would appreciate any comments the forum's readers may offer. I have an ongoing small photography business and want to make sure I don't disrupt it by changing more than I can handle. Pending changes incl

  • Archiving iPhotos library

    I'm about to go on a long trip and I was considering trying to get a bigger hard drive for my Powerbook, when I realized I probably wouldn't have to if I got rid of my 28 GB iPhoto library. I really don't need to travel the world with it taking up al