Sort Images by average luminance -- possible?  Hints?

Another edition of "Not that I know of".  :-)
Is there any way to sort Images in Aperture by average luminance?
Is there any way to determine the average luminance and save this to a custom metadata field?
Bonus: hue?
NB: using the Preview to determine average luminance or hue is OK by me  .
Thanks in advance.
--Kirby.

Frank Caggiano wrote:
Looks like with the current tools in Aperture there is no way to do this. You might want to look and see if there is any third party apps  but I'm not hopeful.
I haven't found anything.  There is the app I mentioned in the similar thread in the OS X Dev forum:  CF/X Photo Mosaic.  It (surprisingly quickly!) creates a database of the images that will be used as tesserae in the making of photo mosaic, and allows the user to sort the image database by average color or average luminance.  I've asked their input.  There is no way to export the database, or — afaict — to use any of the information outside the program itself.
Here's a screengrab from the manual showing images in the Photo Mosaic database with each image's average hue and average luminance displayed as a sample tile and a hex ordinal.  The luminance scale is 1 to 256 (in hex).  I'm not sure what the hue scale is (I guess it's 16 million).
Frank Caggiano wrote:
  One of the new systems strengths is reported to be the ability to write extensions for the core image engine more easily then the current state of writing a plugin for Aperture. Perhaps something will get written then.
We'll see.  I am holding my breath.
Not .

Similar Messages

  • Sort image files by average luminance and by average hue?

    Hi.  I would like to be able to sort images by average luminance and by average hue.  Is there anything in OS X that will let me determine the average luminance or average hue of an image, and save that datum to the image?
    Ultimately, I would like to use this within Aperture (my sole area of expertise {all my ASC points are from the Aperture forum}).  After I posted the question there, a regular suggested I post in this forum to find out what is possible:  specifically, are there any AppleScript hooks that might allow this?  (Sadly, I don't script, but it helps me know what can be done.)
    I know of one program which does this: CF/X's Photo Mosaic, which uses the averages to match an image to a tile in the "master image".  I don't know of any way to attach the Photo-Mosaic-generated averages to the files themselves.  I asked CF/X about this today.
    Thanks.

    Hello
    You may try the AppleScript script listed below. It is a simple wrapper of rubycocoa script which uses CIFilter to calculate average brightness and hue of each image (jpg|jpeg|png) in specified directory tree. It is a skeleton just to generate a TSV output of [brightness, hue, file] records sorted by brightness and then hue on desktop. I don't know how to embed these info into image metabata.
    Script is briefly tested under 10.6.8.
    Hope this may help somehow,
    H
    PS. If copied code has extra spaces in front of every line, which appears to be the case with some browsers including Firefox, please remove them before running the script.
    -- SCRIPT
    set d to (choose folder with prompt "Choose start folder")
    set args to d's POSIX path's quoted form
    do shell script "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -w <<'EOF' - " & args & " > ~/desktop/test_out.txt
    #     get average brightness and hue of image files (jpg|jpeg|png)
    #     * output record = B=brightness [TAB] H=hue [TAB] file [LF]
    #     * sorted by brightness and then hue
    require 'osx/cocoa'
    include OSX
    EXTS = %w[ jpg jpeg png ]    # target extensions
    module OSX
        class << CIContext
            def contextWithSize(w, h)
                br = NSBitmapImageRep.alloc.objc_send(
                    :initWithBitmapDataPlanes, nil,
                    :pixelsWide, w,
                    :pixelsHigh, h,
                    :bitsPerSample, 8,
                    :samplesPerPixel, 4,
                    :hasAlpha, true,
                    :isPlanar, false,
                    :colorSpaceName, NSCalibratedRGBColorSpace,
                    :bytesPerRow, 0,
                    :bitsPerPixel, 0)
                c = NSGraphicsContext.graphicsContextWithBitmapImageRep(br)
                CIContext.objc_send(:contextWithCGContext, c.graphicsPort , :options, {})
            end
        end
        class CIFilter
            def setParameters(dict)
                self.setValuesForKeysWithDictionary(dict)
            end
            def output
                self.valueForKey('outputImage')
            end
        end
        class << CIVector
            def vectorWithRect(r)
                self.vectorWithX_Y_Z_W(r.origin.x, r.origin.y, r.size.width, r.size.height)
            end
        end
    end
    # process ARGV and retrieve image files with given extensions under specfied directory
    raise ArgumentError, %Q[Usage: #{File.basename($0)} directory] unless ARGV.length == 1
    dir, = ARGV.map { |a| a == '/' ? a : a.chomp('/')}
    ff = %x[find -E \"#{dir}\" -type f -iregex '.*/.*\\.(#{EXTS.join('|')})$' -print0].split(/\\0/)
    # get CIContext and CIFilter
    cic = CIContext.contextWithSize(5000, 5000)  # let it be large enough
    cif = CIFilter.filterWithName('CIAreaAverage')
    cif.setDefaults
    # retrieve average brightness and hue of images
    hh = {}
    ff.each do |f|
        u = NSURL.fileURLWithPath(f)
        ci = CIImage.imageWithContentsOfURL(u)
        civ = CIVector.vectorWithRect(ci.extent)
        cif.setParameters({'inputImage' => ci, 'inputExtent' => civ})
        ciout = cif.output
        cgout = cic.objc_send(:createCGImage, ciout, :fromRect, ciout.extent)
        colr = NSBitmapImageRep.alloc.initWithCGImage(cgout).colorAtX_y(0, 0)
        hh[f] = { :b => colr.brightnessComponent, :h => colr.hueComponent}
    end
    # sort criteria
    brightness          = lambda { |k| hh[k][:b] }
    hue                 = lambda { |k| hh[k][:h] }
    brightness_and_hue  = lambda { |k| b, h = hh[k].values_at(:b, :h); b * 1e6 + h }
    # print sorted records
    hh.keys.sort_by(&brightness_and_hue).each do |k|
        b, h = hh[k].values_at(:b, :h)
        puts %Q[B=%f\\tH=%f\\t%s] %  [b, h, k]
    end
    EOF"
    -- END OF SCRIPT

  • I have a mac mini and just purchased a moshi hdmi connector for my LED TV. The problem is, I wanted to be able to take my mouse from one screen to another, not just as a mirror image! Is it possible to do this some how?

    I have a mac mini and just purchased a moshi hdmi connector for my LED TV. The problem is, I wanted to be able to take my mouse from one screen to another, not just as a mirror image! Is it possible to do this some how?

    The Apple Support Communities are an international user to user technical support forum. As a man from Mexico, Spanish is my native tongue. I do not speak English very well, however, I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
    If you have two displays attached, then the function to change from mirrored to extended Desktop will appear in System Prefs/Displays.

  • I need to connect my Imac 27'' (newest version) up to 3/4 monitors (all 40'' LCD tv's with VGA and HDMI connections) with extended display to all external screens, not duplicate images. Is this possible?

    i need to connect my Imac 27'' (newest version) up to 3/4 monitors (all 40'' LCD tv's with VGA and HDMI connections) with extended display to all external screens, not duplicate images. Is this possible?

    I would suggest you visit an Apple dealer, preferably an Apple Store if there's one in your city, and ask for assistance in determining what you need. The questions and issues you bring up are rather complex to address in a technical support forum and would be better addressed in person where you and the salesperson can ask questions back and forth to arrive at the optimal setup.
    Regards.

  • Render a swf object(contains an image) in navigator not possible

    Hy, I have a swf object that is an image(a circle). I have tried to render it in firefox but it doesnt render anything but I have tried with other swf object(not an image, an application) and it renders it ok. So can I render a swf file that is an image or is not possible? should I extract the image in it first to render on the navigator?
    Thanks

    Take a look at
    http://developers.sun.com/jscreator/learning/tutorials
    /2/file_upload.html#07.Thanks jetsons. That particular code sample (#7 in SJSC, #8 in Netbeans) shows only how to serialize a file to a different location on the server, not how to reference a file (not stored within the app forlder) to be rendered as a result of hyperlink click for example. Reading a little further in that page, it says:
    Be careful when putting the uploaded files in the web application as anyone can access the files by URL, such as http://localhost:29080/MyWebApplication/faces/upload/images/myPicture.gif.
    So, I am thinking that for added security, may be it is meant to be that I can't make an imageComponent reference a file outside of the wep app folder, but I am just guessing. In which case, I will simply have to store all such files within the web app folder before attempting to access them, unless someone has a better answer.

  • How do i sort images in iphoto on Ipad

    How do i sort images in iphoto on Ipad

    There is no convenient way to save the comments. You can copy the comments one by one and collect them in a document by pasting them there - a mail, a Pages document, or similar. Add the photo to the document and you have a record of the comments.  It will be a lot of tedious work, however.

  • Sort Images in Table

    Hi,
    I have  a coulm of images in table . and if i click on the header of that coulm , i should get it sorted..is there any way to sort images in coulmn..
    Thanks in advance for a quick answer..
    Regards
    AD

    Hi,
    I tried the table sorter utility.but it is sorting only if there are text property.
    so it is sorting according to the text.
    then i tried the code
    Comparator comparator = new Comparator()
           public int compare(Object x1, Object x2)
              IResultNodeElement e1 = (IResultNodeElement ) x1;
              IResultNodeElement e2 = (IResultNodeElement ) x2;
              return e1.getDs().compareTo(e2.getDs());
         wdContext.nodeResultNode().sortElements(comparator);
    Then it is sorting in one order..is there any way to sort it in other order..
    Regards
    AD

  • Why does Bridge always sort images by rating instead of by date modified?

    Why does Bridge always sort images by rating instead of by date modified?
    This drives me bonkers.  Everytime I look for an image I've been working on, I go to Bridge and I'm always presented with the images sorted by rating instead of by date.
    Then I click on the microscopic sized, extremely tiny arrow that allows one to choose 'sort by date modified' and I resort them to find the file I need.  So that's always 3 extra clicks to find the image.
    WHY can't Bridge sort images by date modified and STAY that way every time I come back?
    Thanks for any help.
    I know I could just keep the recent files rated the highest, but still, I'm wondering if there's a way to make it work the way I'd like it to work?
    jn
    p.s.  Note to Adobe: Please make the selection button for sorting images arrow larger than a fraction of the size of the period at the end of this sentence.  Thanks.

    WHY can't Bridge sort images by date modified and STAY that way every time I come back?
    By default it does stay at the latest selected sort order so this could mean it is due to your install.
    First of all try to reset the preferences for Bridge, hold down option key while restarting Bridge and choose reset preferences. This sets it all to default. First try if the problem is solved then set prefs again to your own custom wishes.
    Also check and repair permissions for the OSX itself (Apple has disk utility in the utility folder for this job, and there are other 3th party applications)
    And be sure to have the latest update for Bridge. (Bridge CS5 should be 4.0.5.11)
    In addition to the method Tai Lao pointed you already to there is a third option, use right click mouse button in content window and the pop up menu has also the sort option at the bottom of the row

  • Adobe Air Initiates the wrong launch Image on iPhone 6 - Possible App Rejection by Apple Review Team for all developers

    I've opened a bug for this issue as well. I want to ask if anyone experiencing the same issue and has found a workaround.  Basically Air Runtime is picking up the wrong launch image when launching on iPhone 6. It defaults to [email protected] instead of the [email protected] iOS 8 picks the correct image but Air Runtime does not. Here is the link for the bug. If this is confirmed, this could result in rejection for all the app developers who optimized their apps for iPhone 6 . It is hard to catch this bug in release mode since the Air Runtime loads pretty fast and it occurs when you device is slow or doing something in the background. You can see it easily on iOS simulator or debug mode. We tried everything for a workaround but we failed.
    Bug#3831747 - Adobe Air Initiates the wrong launch Image on iPhone 6 - Possible App Rejection by Apple Review Team for a…

    Apple recommends the storyboard/xib option but you can still use launch images as assets in your root. When you open a new project in xcode you can look at Contents.json and see the naming conventions they use for iOS8. We grabbed the new naming convention from here. Also setting up in the application xml the UILaunchImages key works too. Please see the below example. It would be a better solution if Adobe Air refers to xml/info.plist values that the developer sets instead of hard-coded naming conventions.
    <key>UILaunchImages</key>
      <array>
          <dict>
              <key>UILaunchImageMinimumOSVersion</key>
              <string>8.0</string>
              <key>UILaunchImageName</key>
              <string>Default-667h</string>
              <key>UILaunchImageOrientation</key>
              <string>Portrait</string>
              <key>UILaunchImageSize</key>
              <string>{375, 667}</string>
          </dict>

  • Help with cropping & sorting images prior to export for print

    I have large project (wedding) within which I've sorted images into several folders (pre-wedding, church, family portraits, etc.) within which there are smart albums based on my ratings. I also have a generic "5 Star" album at the top level which contains the final images that have been adjusted and which the client has been provided with in order to choose from.
    I now have a list of print requirements from the client (image name, size, and quantity).
    I'm curious to know what the quickest way to sort and tag the images selected for print, particularly in view of there being a number of different size requests for the images which are to be printed.
    Also - I'd value opinions (based on experience) on whether I should bother cropping to size for images that are 5x7 and 8x10 (the default ratio is 2x3 at the moment).
    The bottom line is that I'm trying to minimise the amount of time I spend on print tagging and cropping prior to export, and post export sorting prior to sending off to the lab.
    Thanks,
    Paul

    To answer your questions:
    I am assuming that you want a new version of the crop size especially if you have an image/s that are required in multiple sizes like 8x10 and 5x7 the image would end up in each crop size album so you would have two versions one for each aspect ratio and doing the new version in the context of the album would make in the album pic so that the proper one will be at the top of the stack in each respective album.
    Orientation does not matter with the stamp it will work fine - if you have an issue let me know.
    with respect to the stamp - the stamp will position the crop relative to the one you lifted - if your lifted crop is in the middle then so will the stamped ones.
    As for adjustment of the crop - just click on the crop tool, the click on the browser image and arrow through the images with the crop tool open - you can drag the crop around for each one with a minimum of keystrokes.
    Try it and hit me back with issues. I do this all the time and it is about 3000x quicker than my old workflow 5 years ago. For that matter the power of albums, stacks, and stack picks for this kind of thing is fabulous, there are a million ways to use it to speed things up. Bonus is that you are not copying anything so it is virtually free from a resource perspective.
    Last but not least I would think twice before using a smart album to do this, youi really do not want the content changing in this type of album, it will not save you any time, I would use static albums in the manner that I suggested.
    RB
    Ps. If you are interested in the ins and outs of Aperture organization features check out my PDF on the subject there is a bunch of stuff like this.

  • Is there any way that I can sort images by resolution?

    Hello
    Have you guys found out any way or apps can sort images by resolution?
    I've tried Path Finder and Forklift, neither of them can do it .
    For now, I'm doing this with winxp on a PD5...

    You can do this in Finder. If you cntrl+click on the saved search query folder for images you can add resolution (width and/or height). All Images> Show Search Criteria>click on the "+" sign click on the drop down list on the far left select other if you check the box to the right (In Menu) that criteria will show up in the list. I use 4 resolution criteria to eliminate small files when do a "random" search (greater than but less than). You can also save a new "smart folder" with the criteria.

  • Sorting images by pixel size?

    is there a way to sort images by pixel size (ie, all pis over 640x480)? i can't see any way in finder, vitaminSEE or iphoto to sort images this way. am i missing something? or could someone recommend a grogram that can do this (preferably freeware)? thx

    zzwhitejd:
    Welcome to the Apple Discussions. It may be how Picassa and windows handles thumbnails as opposed to OS X. When you imported directly from the PC you might have imported the support files that, on the Mac, contained in the Resource Fork of the file. If you can try copying some of the files again to a folder on the desktop first and see what you get in the way of the number of files.
    To get rid of those duplicates already in the library you can try using Duplicate Annihilator or iPhoto Diet. In either case make a backup copy of the iPhoto LIbrary folder just in case the results are not what you expected.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Aperture 3.2.1 still issues with sorting images in albums, after making adjustments, cannot use arrow keys to go to next image. straightening tool auto turns image prior to straightening inconsistantly

    Have updated aperture to 3.2.1, still having some issues during editing images.
    1. Basic item is sorting images does not happen correctly, move some images in file, they don't move correctly, after trying to move several, then they almost randomly move around.
    2. Straightening tool will automatically tilt images as soon as you touch the tool, turns them on about a 30 degree angle clockwise.
    3. Arrows on right side of keyboard used to move images in browser from the editing position, they move them if no editing is done, once you edit an image, cannot move to the next image using the arrow keys.
    tks, gmoney in ladner

    Oh, baby! This bad boy flies!! Here's what to expect:
    I had 40,000 images in Aperture 3 and it was dog slow at everything. I installed 3.1 update today. It took 5 minutes to update the database and then behaved marginally better than before at ASIC library navigation. I was disappointed.
    Then I QUIT the app. It took a couple of hours to "update files for sharing" with a counter that went to 110,000 images. So it must have updated every thumbnail and variation of preview. Turned it back on , and BAM. Came up fully in seconds. Paused for 10 seconds ten everything was lickrty split. For the first time ever, I can use the Projects view with all 791 projects and scroll quickly. I even put it in photos modevand whipped thru all 49,000 images!
    Haven't done anybprocessing yet, but i'm liking it!!
    Jim

  • Build Error: Append image and delete if possible.vi

    Good morning,
    I'm using LabVIEW 9.0 with the application builder and when I attempt to build my application I receive this error:
    An error occurred while saving the following file:
    C:\Program Files\National Instruments\LabVIEW 2009\vi.lib\printing\ReportDocExtensions.llb\Standard Report\Append image and delete if possible.vi
    Invoke Node in AB_Source_VI.lvclass:Close_Reference.vi->AB_Build.lvclass:Copy_Files.vi->AB_Application.lvclass:Copy_Files.vi->AB_EXE.lvclass:Copy_Files.vi->AB_Build.lvclass:Build.vi->AB_Application.lvclass:Build.vi->AB_EXE.lvclass:Build.vi->AB_Engine_Build.vi->AB_Build_Invoke.vi->AB_Build_Invoke.vi.ProxyCaller
    <APPEND>
    Method Name: <b>Save:Target Instrument</b>
    I did some research and this seems to be related to saving a front panel image to an HTML file.  I'm not storing the front panel image at all, nor am I storing anything to an HTML file, only Excel.
    Just in case I had somehow inadvertently added it to my project (this is my first LabVIEW project and I've made all kinds of mistakes, haha) I performed a search of my project for "Append image and delete if possible.vi" and it was not found.
    Does anyone have any thoughts on this?  I'm not sure what other information I should post here, please let me know if I missed something.
    Thanks!
    Solved!
    Go to Solution.

    Dear Logan,
    This error occurs in the saving process (before the build is complete). In the details section says:
    Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference:
    Error 6 occurred at AB_Source_VI.lvclass:Close_Reference.vi -> AB_Build.lvclass:Copy_Files.vi -> AB_Application.lvclass:Copy_Files.vi -> AB_EXE.lvclass:Copy_Files.vi -> AB_Build.lvclass:Build.vi -> AB_Application.lvclass:Build.vi -> AB_EXE.lvclass:Build.vi -> AB_Engine_Build.vi -> AB_Build_Invoke.vi -> AB_Build_Invoke.vi.ProxyCaller
    Possible reason(s):
    LabVIEW:  Generic file I/O error.
    =========================
    NI-488:  I/O operation aborted.
    I repaired my LV2009 instalation and doesn't worked. The last thing i'll do is to reinstall all my NI software . I'll spend a whole day doing that.

  • Column Sort image display permanent

    By default adf table column sorting image is displayed on mouse hover.
    I need to display sort images permanently with the column name.
    How can I do it? Please help.
    Thanks,

    Hi,
    Use sortable="true" for relevant Column and define sortProperty.
    <af:column sortProperty="NodeSubsidiaryType" sortable="true"
                             headerText="Header" id="c14" width="40">
                    <af:outputText value="#{row.field}" id="ot12"/>
    </af:column>

Maybe you are looking for