Histograms

I really need help in writing a program which has 2 images as input and 2 histograms as output.
Please help!
Thanks.

If I get it right,
you want to extract the color-information for the different pixels within the
image, split this into the three main-colors (considering RGB-color scheme),
and finally sum these up into three histograms for the image.
If I remember correclty, histograms are a means for representing statistical
data by grouping them into different bins (usually equally sized) and plot the
bins along the X-axis while plotting the occurences within each bin along the
y-axis.
So for instance for constructing a histogram of 16 bins (having equal sizes of 16),
you would have to iterate over all pixels within the image and
for each of the colors get the level, and add this to a certain bin.
How to do this:
1 - read the image data
2 - get the raster-data of the image containing the pixels with the associated
color-value for each pixel.
3 - if necessary, convert this color-value to a RGB-color value
Perhaps it is no bad idea to store the intermediate color-values for all pixels
within a List. This makes it easier to iterate over the colors.
It also allows you to interpret the same color-information more
than once without having to read, interprete and convert the images again.
This also allows to extract other information than RGB
(like hue-saturation-luminance)
4 - split the color-value into the color-components you would like
you could again store intermediate results within a list
5 - build the histogram
- a - construct a map containing the histogram-bins.
- b - iterate over the list of color-components for one color
- c - find the bin in which each value fits
- d - retrieve the object associated with the bin in the map
- e - if the object is not existing --> add a new integer(1)
- f - if the object is existing --> cast to integer, get intValue, add one,
make a new integer of the result and replace the former value from the map
with this integer.
6 - build some visualisation of the histogram
kind regards,

Similar Messages

  • Is there a workaround for Photoshop CS6 Histogram?

    I have noticed this and I am wondering if there is a more feasable workaround other than saving my work, closing the application and reopening the app.
    Here are the steps:
    Open a file (any file type compatible)
    Open the histogram window
    Open the layers window
    If one layer / Background unlock
    OR
    Open file with multiple layers (image, mask, or adjustment)
    In Layer window now deselect the background layer or all of the layers by clicking on the window below the layers (RIGHT under "Layer 0" in layer window)
    The histogram changes to B&W histogram
    The only way to revert to the previous Color display is to close PS CS6 and reopen it. Then you are back to the full histogram.
    When editing multiple layers in files, or compositing, this is really an issue and slows down workflow.
    Is there another workflow? I have attempted a couple workarounds but none have worked other than restart.
    Any idea what is happening? or is anyone else running into this?
    Just "Not selecting" is not an option.

    Seems like that has happened for several versions.
    To get back to Colors without restarting photoshop cs6, you can go to Expanded View and choose Colors from the drop-down list.

  • Use of Index, Histograms, etc

    Hi all,
    We're using Oracle 9.2.04.
    I have a table with 500000 rows.
    So I have a query that returns only 30242 for a month, like:
    SELECT * FROM T1
    WHERE TO_CHAR(DT, 'MM/YYYY') = TO_CHAR(ADD_MONTHS(SYSDATE, -1), 'MM/YYYY')
    I have a index for this column:
    CREATE INDEX IND_T1_DT_FMT ON T1 (TO_CHAR(DT, 'MM/YYYY'))
    TABLESPACE TBS_SOME_USER;
    There are statistics for this table.
    Looking the table data, I have the following distribution:
    Qty     MON/YY  %
    1         Feb-09     0.000219142
    99         Apr-09     0.021695016
    38439     May-09     8.42358314
    98231     Jun-09     21.52649641
    1         Jul-06     0.000219142
    139959     Jul-09     30.6708362
    1         Aug-02     0.000219142
    1         Aug-07     0.000219142
    141362     Aug-09     30.97829184
    30242     Sep-09      6.62727962
    7990              1.750941213But when a perform the query (that returns 30242 rows - 6.63% of table):
    SELECT * FROM T1
    WHERE TO_CHAR(DT, 'MM/YYYY') = TO_CHAR(ADD_MONTHS(SYSDATE, -1), 'MM/YYYY')
    Oracle uses FTS:
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=432 Card=45633 Bytes
    =3011778)
    1 0 TABLE ACCESS (FULL) OF 'T1' (Cost=432 Card=45633 Bytes
    =3011778)
    So, Oracle should not use the index in this case?
    Is there any way to gather statistics for this table with a index based function?
    Something like this:
    EXECUTE DBMS_STATS.GATHER_TABLE_STATS(ownname => 'U1',
    tabname => 'T1', method_opt => 'FOR COLUMNS TO_CHAR(DT, ''MM/YYYY'')',
    cascade => true, degree => 4);
    How can I create histograms for this case?
    Or other solution, like Partition?
    thank you very much!!!!

    Always treat dates like dates.
    This
    SELECT * FROM T1
    WHERE TO_CHAR(DT, 'MM/YYYY') = TO_CHAR(ADD_MONTHS(SYSDATE, -1), 'MM/YYYY')Should be more like this:
    SELECT * FROM T1
    WHERE DT BETWEEN TRUNC(ADD_MONTHS(SYSDATE,-1),'MM') AND TRUNC(SYSDATE,'MM')-1 ;Then you should index DT.
    But, should this query use the index?
    Touch and go at 6.63%.
    Give it a go using dates as dates and see if it makes a difference.
    Is there a problem with the performance of the FTS?

  • I have lightroom 5.7 and a macbook pro 10.9.5.  Occasionally when I am editing a photo in the develop module, I suddenly get a "file not found" message and the editing ceases to work.  There is no "exclamation" icon below the histogram box in the Library

    I have lightroom 5.7 and a macbook pro 10.9.5.  Occasionally when I am editing a photo in the develop module, I suddenly get a "file not found" message and the editing ceases to work.  There is no "exclamation" icon below the histogram box in the Library module or on the photo in grid view, and the histogram is gone.  What is going on? Trying to find it using the "find missing photos" in the library menu does nothing.

  • Performance issue with extreme data distribution using histogram

    Hi
    We have a performance stability issue which we later found out is cause by the bind variable and histogram for a particular column when it was use as part of equality predicate. Assume the column name is parent_id0.
    There is also an index on parent_id0.
    Our temporary workaround is to install the good plan when it is started.
    This is on database 10.2.0.3. I have a table with 2570149 rows, there is one common value(value 0) that represent about 99.91% of the total rows.
    When i do
    select parent_id0, count(*)
    from table1
    group by parent_id0
    order by parent_id0;
    I'm getting 187 rows and i would assume to have 187 buckets to have a better representation. The first row have the count nearly to 99.91%. The rest rows are having count something like 1 or 2 or less than 200.
    With the auto gather, Oracle came up with 5 bucket. When i check the sample size, i only see oracle uses 2.215% of all the total rows at that time.
    Column name Endpoint num Endpoint value
    PARENT_ID0     5,579     0
    PARENT_ID0     5,582     153,486,811
    PARENT_ID0     5,583     156,240,279
    PARENT_ID0     5,584     163,081,173
    PARENT_ID0     5,585     168,255,656
    Is the problem due to the wrong sample size and hence the histogram is miscalculated.
    When i trace the sql with 10053, i see something like this..seems like some value is not capture in the histogram.
    Using prorated density: 3.9124e-07 of col #2 as selectivity of out-of-range value pred
    What i need to do to have a correct and stable execution plan?
    Thank you

    Hi, its an OLTP environment.
    The problem is this sql has 4 tables to join, table1 (2.5 mil rows), table2 (4 mil), table3 (4.6 mil) and table4 (20 mil)
    By right, the table with the highest filter ratio is table1. However, from the plan, oracle is using table3 as the driving table. The moment i take away the parent_id0 as part of the predicate, Oracle choose the right driving table (table1).
    Here is the sql structure
    select ...
    from table1, table2, table3, table4
    where table1.id = :1 and table1.parent_id0 :=2
    and ...
    We have index on id column too.
    From the application, the application will never pass in value 0 for the parent_id0. Therefore, we will be querying 0.09 percent all the time from that particular query.
    p/s: i'm sorry that i'm not able to paste the exact sql text here

  • Multiple plots (different colours) on a single histogram?

    I have a 2D array of data, and I would like to plot a histogram.
    each row(with 8 elements) would be plotted in pairs, in 2 different colours.
    My chart would  have to look something like the attached image.
    My vi is also attached. Right now it displays the plot (one row for now),but I have a few problems:
    1) How to change the colour of each bar (to be like the excel graph)
    2) how to change the bar plot label ( so instead numeric values 1,2,3,...I would like to have a,b,c,... under each bar)
    3)and how to remove the (0,0) point on  the graph, so you could see the first bar entirelyy, instead of partially.
    I tried bundling the data , dynamic data, and a a bunch of other things  but couldnt get it to work.
    Thanks!!
    Attachments:
    plot.PNG ‏15 KB
    display histogram- 2.vi ‏91 KB

    You can create a histogram of each row by connecting the output of the General Histogram or Histogram VI's (in the Statistics Palette) to a Build Array. Connect the output of Build Array to a Histogram Graph. You can create a Histogram Graph by right clicking on the General Histogram or Histogram VI's Histogram Graph output terminal( Create>>Indicator). That should show you both histograms with different colors in one graph(they may be overlapping though, use the Bar Plots options to see what view is best). Unfortunately, I don't see how you could display it like the graph you posted, but you may create a button that controls a Histogram Graph by using Property Nodes. Right click on the Histogram Graph indicator in the Block Diagram(Create>>Property Node>>Plot>>Visible). If you connect a Boolean control to this property node and place that piece of code inside a while loop, you could turn your plots on and off. You can also create an Invoke Node(Right Click>>Create>>Invoke Node>>Export data to Excel) to Export data to Excel. Make sure you expand the Plot Legend on the upper right corner so you can see the second plot options.
    Here are some links that might be helpful:
    http://zone.ni.com/reference/en-XX/help/371361H-01​/lvconcepts/customizing_graphs_and_charts/
    http://forums.ni.com/t5/LabVIEW/Can-labview-displa​y-a-histogram-plot-of-data/td-p/971038
     I hope this helps.
    Andres G
    Applications Engineer
    National Instruments

  • How can i plot a histogram with using the results of Line Length

    PLS HELP.How can i prepare a histogram with using the results of line length code(It is somewhere in the middle).
    This is a final exam take-home question. I would appreciate if you can help?
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    import java.text.*;
    import java.io.File;
    public class WordAnalyser extends JFrame implements ActionListener
    private JMenuItem jmiAc, jmiSil, jmiCikis, jmiAnaliz, jmiHakkinda, jmiKullanim;
    private JTextArea jta1, jta2;
    private JFileChooser jFileChooser = new JFileChooser();
    File hafizada;
    File aktarilan = new File("Sonuc.txt");
    // Main method
    public static void main(String[] args)
    WordAnalyser frame = new WordAnalyser(); /* Ana ekran olusturulur */
    frame.setSize(400, 300); /* Degerleri belirlenir */
    frame.setVisible(true); /* Gorunebilirligi ayarlanir */
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    public WordAnalyser()
    setTitle("Serkan Ozgen Dosya Inceleme Programina Hos Geldiniz");
    JMenuBar mb = new JMenuBar();
    setJMenuBar(mb);
    JMenu fileMenu = new JMenu("Dosya");
    fileMenu.setMnemonic('F');
    mb.add(fileMenu);
    JMenu helpMenu = new JMenu("Degerlendirme");
    helpMenu.setMnemonic('H');
    mb.add(helpMenu);
    JMenu kullanimMenu = new JMenu("Kullanim Kilavuzu");
    mb.add(kullanimMenu);     
    fileMenu.add(jmiAc = new JMenuItem("Ac", 'A'));
    fileMenu.add(jmiSil = new JMenuItem("Sil", 'S'));
    fileMenu.add(jmiCikis = new JMenuItem("Cikis", 'C'));
    helpMenu.add(jmiAnaliz = new JMenuItem("Analiz", 'D'));
    helpMenu.add(jmiHakkinda = new JMenuItem("Hakkinda", 'H'));
    kullanimMenu.add(jmiKullanim = new JMenuItem("Kullanim"));     
    getContentPane().add(new JScrollPane(jta1 = new JTextArea()), BorderLayout.CENTER);
    getContentPane().add(jta2 = new JTextArea(), BorderLayout.SOUTH);
    jmiAc.addActionListener(this);
    jmiSil.addActionListener(this);
    jmiCikis.addActionListener(this);
    jmiAnaliz.addActionListener(this);
    jmiHakkinda.addActionListener(this);
    jmiKullanim.addActionListener(this);
    public void actionPerformed(ActionEvent e)
    String actionCommand = e.getActionCommand();
    if (e.getSource() instanceof JMenuItem)
    if ("Ac".equals(actionCommand))
    Ac();
    else if ("Sil".equals(actionCommand))
    Sil();
    else if ("Cikis".equals(actionCommand))
    System.exit(0);
    else if ("Analiz".equals(actionCommand))
    sayim();
    else if ("Hakkinda".equals(actionCommand))
    JOptionPane.showMessageDialog(this,
    "!!!! Bu program text analizi gerceklestirir. Her hakki saklidir SERKAN OZGEN!!!!",
    "Bu program hakkinda",
    JOptionPane.INFORMATION_MESSAGE);
    else if ("Kullanim".equals(actionCommand))
         JOptionPane.showMessageDialog(this,
         " Ilk once dosya menusunden Ac i tiklayarak analiz etmek istediginiz Dosyayi seciniz (Lutfen uzantisi *.txt \nveya *.log olsun). Daha sonra Degerlendirme menusunden analizi tiklarsaniz dosyanizda kac adet rakam, harf, \ncumle ve kelime oldugunu gorebilirsiniz. Simdiden kolay gelsin",
         "Programin kullanim detaylari",
         JOptionPane.INFORMATION_MESSAGE);
    private void Ac()
    if (jFileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION)
    hafizada = jFileChooser.getSelectedFile();
    Ac(hafizada);
    // Acilan Dosyayi ana ekranda gostermeye yariyan bir method
    private void Ac(File file)
    try
    // Acilan dosyayi okuma ve ana ekranda gosterme
    BufferedInputStream in = new BufferedInputStream(new FileInputStream(file));
    byte[] b = new byte[in.available()];
    in.read(b, 0, b.length);
    jta1.append(new String(b, 0, b.length));
    in.close();
    catch (IOException ex)
    // Temizle tusunun hangi ekranlara etki edecegini secme
    private void Sil()
    jta1.setText("");
    jta2.setText("");
    private void sayim()
    int buff;
    int sayac = 0;
    int Cumleler = 0;
    int Kelimeler = 0;
    int Karakterler = 0;
    int Satirlar = 0;
    int Rakamlar = 0;     
    boolean start = true;
    int linenum = 0;     
    try
    FileInputStream instream = new FileInputStream(hafizada);
    FileOutputStream outstream = new FileOutputStream(aktarilan);
         BufferedReader infile = new BufferedReader(new InputStreamReader(new FileInputStream(hafizada)));
    PrintStream out = new PrintStream(outstream);
         out.println("---Kelime Avcisinin Sonuclari---");
         String line = infile.readLine();
         while (line != null){
         int len = line.length();
         linenum++;
         line = infile.readLine();
         out.println("Line Length :"     + linenum + "\t" +len);
    while ((buff=instream.read()) != -1)
    switch((char)buff)
    case '?': case '.': case '!': /* Eger "?", "." veya "!" gorurse program cumleleri ve kelimeleri arttirir*/
    if (start == false)
    Cumleler++;
    Kelimeler++;
    start = true;
    break;
    case ' ': case '\t': case ',': case ';': case ':': case'\"': case'\'': /* Eger /t,;:\ ve \" bu isarteleri goruruse program kelimeleri arttirir */
    if (start == false)
    Kelimeler++;
    start = true;
    break;
              case 'n': case '\n': /* Eger \n gorurse satirlari arttirir */
              if (start == false)
                   Satirlar++;
                   Kelimeler++;
                   start = true;
              break;
    default:
    if (((char)buff >= 'a' && (char)buff<='z')|| /*a-z, A-Z veya - degerlerini gorurse karakterler arttirilir */
    ((char)buff >= 'A' && (char)buff<='Z')||
    ((char)buff == '-'))
    Karakterler++;
    if ((Kelimeler % 50) == 49)
    if (start == true)
                   out.println();     
    out.print((Kelimeler+1) + " ");
    out.print((char)buff);
    start = false;
              if ((char)buff >='0' && (char)buff <='9') {  /* 0-9 gorurse rakamlari arttiri */
                   Rakamlar++; }
    }// switch
         }//while
    instream.close();
    out.println();
    out.println();
    out.println("Karakter sayisi: " + Karakterler);
         out.println("Kelime sayisi: " + Kelimeler);
    out.println("Cumle sayisi: " + Cumleler);
         out.println("Satir sayisi: "+ Satirlar);
         out.println("Rakam sayisi: "+ Rakamlar);
    outstream.close();
    try
    BufferedInputStream in = new BufferedInputStream(new FileInputStream(aktarilan));
    byte[] b = new byte[in.available()];
    in.read(b, 0, b.length);
    jta2.append(new String(b, 0, b.length));
    in.close();
    catch (IOException ex)
    catch (Exception e)
    System.out.println(e);
    }

    Why is it that you're not interested in IOExceptions?
    catch (IOException ex)
    } Empty catch blocks is a hallmark of foolish Java code. At least print out the stack trace.
    %

  • How can I convert (or switch) the RGB percent values from the LR histogram into RGB values which are shown e. g. in PS/CameraRAW?

    In LR 5.5 (same in previous versions) the RGB values in the histogram are shown in percent (relativ) values. I prefere to see the absolute values, but I can`t find any way to switch. Maybe this option is intentional disabled, because LR works in 16-Bit mode this would result in values up to 2^16. But as i compared the relativ values from LR with the absolute values from PS i run into a conversion problem. The following example shows the differences:
    CameraRAW : RGB, 128,0,0
    Lightroom: RGB, 43,8%, 19,0%, 6,2%
    CameraRAW: RGB, 0,128,0
    Lightroom: RGB, 29,8%, 47,5%, 17,5%
    Mainly i have two questions:
    1. Is there any possibility to change the percent RGB values in LR to absolut values?
    2. How can i convert CameraRAW values to LR values (see above)?

    TThe reason that a design decision was made from the beginning of LR to show only the percentage values was that RGB values are dependent on the color space and the LR histogram and numerical readout are derived from the Develop module's display space which is a hybrid color space with ProPhoto RGB primaries and the sRGB TRC. Thus the numerical values in the display would be different from the exported RGB image (in an orthodox space) and it was feared that this would be misleading. When soft proofing was introduced, because it involved converting the display to an orthodox space, it became possible to use the 0-255 scale in that mode.

  • Trying to create a Histogram type/object for aggregate functions

    Hi,
    I am trying to create an aggregate function that will return a histogram
    type.
    It doesn't have to be an object that is returned, I don't mind returning
    a string but I would like to keep the associative array (or something
    else indexed by varchar2) as a static variable between iterations.
    I started out with the SecondMax example in
    http://www.csis.gvsu.edu/GeneralInfo/Oracle/appdev.920/a96595/dci11agg.htm#1004821
    But even seems that even a simpler aggregate function like one strCat
    below (which works) has problems because I get multiple permutations for
    every combination. The natural way to solve this would be to create an
    associative array as a static variable as part of the Histogram (see
    code below). However, apparently Oracle refuses to accept associate
    arrays in this context (PLS-00355 use of pl/sql table not allowed in
    this context).
    If there is no easy way to do the histogram quickly can we at least get
    something like strCat to work in a specific order with a "partition by
    ... order by clause"? It seems that even with "PARALLEL_ENABLE"
    commented out strCat still calls merge for function calls like:
    select hr,qtr, count(tzrwy) rwys,
    noam.strCat(cnt) rwycnt,
    noam.strCat(tzrwy) config,
    sum(cnt) cnt, min(minscore) minscore, max(maxscore) maxscore from
    ordrwys group by hr,qtr
    Not only does this create duplicate entries in the query result like
    "A,B,C" and "A,C,B" it seems that the order in rwycnt and config are not
    always the same so a user can not match the results based on their
    order.
    The difference between my functions and functions like sum and the
    secondMax demonstrated in the documentation is that secondMax does not
    care about the order in which it gets its arguments and does not need to
    maintain an ordered set in order to return the correct results. A good
    example of a built in oracle function that does care about all its
    arguments and probably has to maintain a similar data structure to the
    one I want is the PERCTILE_DISC function. If you can find the code for
    that function (or something like it) and forward a reference to me that
    in itself would be very helpful.
    Thanks,
    K.Dingle
    CREATE OR REPLACE type Histogram as object
    -- TYPE Hist10 IS TABLE OF pls_integer INDEX BY varchar2(10),
    -- retval hist10;
    -- retval number,
    retval noam.const.hist10,
    static function ODCIAggregateInitialize (sctx IN OUT Histogram)
    return number,
    member function ODCIAggregateIterate (self IN OUT Histogram,
    value IN varchar2) return number,
    member function ODCIAggregateTerminate (self IN Histogram,
    returnValue OUT varchar2,
    flags IN number) return number,
    member function ODCIAggregateMerge (self IN OUT Histogram,
    ctx2 IN Histogram) return number
    CREATE OR REPLACE type body Histogram is
    static function ODCIAggregateInitialize(sctx IN OUT Histogram) return
    number is
    begin
    sctx := const.Hist10();
    return ODCIConst.Success;
    end;
    member function ODCIAggregateIterate(self IN OUT Histogram, value IN
    varchar2)
    return number is
    begin
    if self.retval.exist(value)
    then self.retval(value):=self.retval(value)+1;
    else self.retval(value):=1;
    end if;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateTerminate(self IN Histogram,
    returnValue OUT varchar2,
    flags IN number)
    return number is
    begin
    returnValue := self.retval;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateMerge(self IN OUT Histogram,
    ctx2 IN Histogram) return number is
    begin
    i := ctx2.FIRST; -- get subscript of first element
    WHILE i IS NOT NULL LOOP
    if self.retval.exist(ctx2(i))
    then self.retval(i):=self.retval(i)+ctx2.retval(i);
    else self.retval(value):=ctx2.retval(i);
    end if;
    i := ctx2.NEXT(i); -- get subscript of next element
    END LOOP;
    return ODCIConst.Success;
    end;
    end;
    CREATE OR REPLACE type stringCat as object
    retval varchar2(16383), -- concat of all value to now varchar2, --
    highest value seen so far
    static function ODCIAggregateInitialize (sctx IN OUT stringCat)
    return number,
    member function ODCIAggregateIterate (self IN OUT stringCat,
    value IN varchar2) return number,
    member function ODCIAggregateTerminate (self IN stringCat,
    returnValue OUT varchar2,
    flags IN number) return number,
    member function ODCIAggregateMerge (self IN OUT stringCat,
    ctx2 IN stringCat) return number
    CREATE OR REPLACE type body stringCat is
    static function ODCIAggregateInitialize(sctx IN OUT stringCat) return
    number is
    begin
    sctx := stringCat('');
    return ODCIConst.Success;
    end;
    member function ODCIAggregateIterate(self IN OUT stringCat, value IN
    varchar2)
    return number is
    begin
    if self.retval is null
    then self.retval:=value;
    else self.retval:=self.retval || ',' || value;
    end if;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateTerminate(self IN stringCat,
    returnValue OUT varchar2,
    flags IN number)
    return number is
    begin
    returnValue := self.retval;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateMerge(self IN OUT stringCat,
    ctx2 IN stringCat) return number is
    begin
    self.retval := self.retval || ctx2.retval;
    return ODCIConst.Success;
    end;
    end;
    CREATE OR REPLACE FUNCTION StrCat (input varchar2) RETURN varchar2
    -- PARALLEL_ENABLE
    AGGREGATE USING StringCat;

    GraphicsConfiguration is an abstract class. You would need to subclass it. From the line of code you posted, it seems like you are going about things the wrong way. What are you trying to accomplish? Shouldn't this question be posted in the Swing or AWT forum?

  • I've lost the histogram - and other adjustment woes

    I filed a rather long description of this to the Aperture Feedback, but as I suspect that is a "write only" channel I thought I'd ask here (and I did review a bunch of posts with no luck)
    I have a brand spanking new MacPro quad, with 2 NVIDIA GeForce 7300 GT video cards (I mention this only because of Aperture's use of GPUs).
    In summary, I imported a project that works fine on my MacBook Pro, but on my MacPro the histogram in the adjustments HUD is gone. When I try to make an adjustment, a HUGE black triangle appears where the preview image was, the histogram magically appears, I make the adjustment (the slider is not smooth), a full second passes and the preview is updated with the adjustment -- and, of course, the histogram disappears. When the system is feeling particularly nasty, the preview comes up completely black after the adjustment (although the thumbnail appears to be updated properly).
    Suffice it to say I've tried everything but yank out the RAM and the GPUs... I've seen this on some images in other projects. I created a new Aperture library and loaded some images (from different cameras) -- all exhibit this behavior. I've stopped and restarted Aperture. I've shutdown and restarted the MacPro. I've reverted my profiles for the displays to the Apple defaults. I've started considering moving to Lightroom...
    Aperture is such a wonderful program when it works... I've had a bunch of minor issues with the program over the past year I've been using it - but this is insane.
    If anyone can provide some clues as to how to fix this I'd appreciate it.
    Thanks,
    - dave
    Note: A small update to my post. I thought the histogram had disappeared, but upon closer inspection it is there -- but it reads as if it were a completely black image (e.g., all of the values are in the first column). Another clue...
    Message was edited by: davebets

    I should mention that i have NOT upgraded to iOS 5 on the 3GS and don't want to.  Therefore, no iCloud on the phone.

  • I'm having Trouble with a Simple Histogram

    The program as a whole is supposed to read a text file, count the number of words, and ouput it. For example, "The The The pineapple pineapple" should ouput "The 3, Pineapple 2" I've gotten as far as dumping the tokens into an array and creating 2 empty arrays of the same size(word, count), but I don't know how to do the double loop that's necessory for the count. Please see my "hist()" method, this is where I'm having trouble. Any suggestions at all would be greatly appreciated. import java.io.*;
    import java.util.*;
    /*class Entry {
        String word;
        int count;
    class main { 
        public static void main(String[] args){
         main h = new main();
         h.menu();
        String [] wrd;
        String [] words;
        int[] count;
        int wordcount = 0;
        int foundit = -1;
        int size;
        int numword = 0;
        int i = 0;
        int j = 0;
        int elements = 0;
        public void menu() {
          System.out.println("Welcome to Histogram 1.0");
          BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
          while(true){
              System.out.println("Please enter one of the following commands: open, hist, show, save, help, or quit");
              String s = null;
              try {s = in.readLine();} catch (IOException e) {}
              if (s.equals("open")) open();
              else if (s.equals("hist")) hist();
              else if (s.equals("show")) show();
              else if (s.equals("save")) save();
              else if (s.equals("help")) help();
              else if (s.equals("quit")) {
                  System.exit(0);
         public void open(){
         // prompt user for name of file and open it
         System.out.println("Enter Name Of File: ");
         BufferedReader in = new BufferedReader(new InputStreamReader (System.in));
         String filename = null;
         try{ filename = in.readLine();}
         catch(IOException e)  {}
         BufferedReader fin = null;
         try { fin = new BufferedReader (new FileReader(filename));}
         catch (FileNotFoundException e){
             System.out.println("Can't open file "+filename+" for reading, please try again.");
             return;
         // read file for 1st time to count the tokens
         String line = null;
         try{ line = fin.readLine();}
         catch(IOException e) {}
         StringTokenizer tk = new StringTokenizer(line);
         while(line!= null){
             try{ line = fin.readLine();}
             catch(IOException e) {}
             //tk = new StringTokenizer(line);
             wordcount += tk.countTokens();
             System.out.println("wordcount = " + wordcount);
         // close file
         try{fin.close();}
         catch(IOException e){
             System.out.println( filename+" close failed");
         // now go through file a second time and copy tokens into the new array
         wrd = new String [wordcount];
            BufferedReader fin2 = null;
            try{ fin2 = new BufferedReader (new FileReader(filename));}
            catch(FileNotFoundException e){
                System.out.println("Can't open file "+filename+" for reading, please try again.");
                return;
            String pop = null;
            try{ pop = fin2.readLine();}
            catch(IOException e) {}
            StringTokenizer tk2 = new StringTokenizer(pop);
         int nextindex = 0;
         while(pop!=null){
             while (tk2.hasMoreTokens()) {
              wrd[nextindex] = tk2.nextToken();
              nextindex++;
             try{ pop = fin2.readLine();}
             catch(IOException e) {}
             //tk2 = new StringTokenizer(pop);
         try{fin2.close();}
         catch(IOException e){
             System.out.println(filename+" close failed");
         for(int k=0;  k<wordcount; k++){
            System.out.println(wrd[k]);
        public void hist() {
            //prints out all the tokens
           words = new String[wordcount];
           count = new int[wordcount];
           //boolean test = false;
               for(int m=0; m<wordcount; m++){
                   if(words.equals(wrd[m])){
                       System.out.print("match");        
                   else{
                       words[m] = wrd[m];
                       count[m] = 1;
        public void show() {
         //shows all the tokens
         for(int j=0; j<wordcount; j++){
              System.out.print(words[j]);
              System.out.print(count[j]);
        public void save() {
            //Write the contents of the entire current histogram to a text file
            PrintWriter out = null;
            try { out = new PrintWriter(new FileWriter("outfile.txt"));}
            catch(IOException e) {}
            for (int i= 0; i<wordcount; i++) {
                out.println(words);
    out.println(count[i]);
    out.close();
    public void help() {
    System.out.println(" This help will tell you what each command will do.");
    System.out.println("");
    System.out.println(" open - this command will open a text file that must be in the same directory ");
    System.out.println(" as the program and scan through it counting how many words it has, ");
    System.out.println("");
    System.out.println(" hist - after you use the open command to open the text file the hist command will ");
    System.out.println(" make a tally sheet counting how many times each word has been used. ");
    System.out.println("");
    System.out.println(" show - after you have opened the file with the open command and created a histogram ");
    System.out.println(" with the hist command the show command will show a portion of or the entire h histogram. ");
    System.out.println("");
    System.out.println(" (show) just by itself will show the entire histogram. ");
    System.out.println("");
    System.out.println(" (show abc) will show the histogram count for the text abc if it exists. ");
    System.out.println(" If the text is not found it will display text not found. ");
    System.out.println("");
    System.out.println(" (show pr*) will show the histogram count for all text items that begin with ");
    System.out.println(" the letters pr, using * as a wild card character. ");
    System.out.println("");
    System.out.println(" save - after you have opened the file with the open command, and created the histogram ");
    System.out.println(" with the hist command the save command will save the contents of the entire current histogram. ");
    System.out.println(" to a text file that you choose the name of. If the file already exists the user will be prompted ");
    System.out.println(" for confirmation on if they want to pick another name or overwrite the file.");
    System.out.println("");
    System.out.println(" quit - will quit the program. " );

    Couple of points to begin with:
    1. Class names should begin with an upper case letter
    2. Class names should be descriptive
    3. You shouldn't call your class main (this kind of follows from the first two points).
    4. Always use {} around blocks of code, it will make your life, and those of the people who have to eventually maintain your code a lot easier.
    5. Never ignore exceptions, i.e. don't use an empty block to catch exceptions.
    6. Avoid assiging a local variable to null, especially if the only reason you are doing it is to "fix" a compilation error.
    7. Your method names should reflect everything that the method does, this should encourage you to break the application logic down into the smallest tasks possible (a general rule is that each method should do one task, and do it well). In the example below, I ignore this advice in the loadFile() method, but it's left as an exercise to you to fix this.
    8. You should use descriptive variable names (fin may make sense now, but will it in 6 months time?), and use camel case where the name uses multiple words, e.g. wordcount should be wordCount
    On the problem at hand, I'll post a cut down example of what you want, and you can look at the javadocs, and find out how it works.
    This code uses the auto-boxing feature of 1.5 (even though I don't like it, again it's left as an exercise for you to remove the auto-boxing ;) ) and some generics (you should be able to work out how to use this code in 1.4).
    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.HashMap;
    import java.util.Map;
    import java.util.StringTokenizer;
    public class Histogram {
        /** Map to box the words. */
        private Map<String, Integer> wordMap = new HashMap<String, Integer>();
         * Main method.
         * @param args
         *        Array of command line arguments
        public static void main(String[] args) {
            Histogram h = new Histogram();
            h.menu();
         * Display the menu, and enter program loop.
        public void menu() {
            System.out.println("Welcome to Histogram 1.0");
            BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
            while (true) {
                System.out.println("Please enter one of the following commands: open, hist, show, save, help, or quit");
                String s = null;
                try {
                    s = in.readLine();
                } catch (IOException e) {
                    System.out.println("Unable to interpret the input.");
                    continue;
                if (s.equals("open")) {
                    loadFile();
                } else if (s.equals("quit")) {
                    System.exit(0);
         * Ask the user for a file name and load it
        public void loadFile() {
            System.out.println("Enter Name Of File: ");
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            String filename = null;
            try {
                filename = reader.readLine();
                reader = new BufferedReader(new FileReader(filename));
                loadWords(reader);
                reader.close();
            } catch (FileNotFoundException e) {
                System.out.println("Can't open file " + filename + " for reading, please try again.");
                return;
            } catch (IOException e) {
                System.out.println(filename + " close failed");
            displayHistogram();
         * Load the words from the file into the map.
         * @param reader
        private void loadWords(BufferedReader reader) {
            int wordCount = 0;
            try {
                String line = reader.readLine();
                while (line != null) {
                    StringTokenizer tk = new StringTokenizer(line);
                    wordCount += tk.countTokens();
                    while (tk.hasMoreTokens()) {
                        String next = tk.nextToken();
                        if (wordMap.containsKey(next)) {
                            wordMap.put(next, (wordMap.get(next).intValue() + 1));
                        } else {
                            wordMap.put(next, 1);
                    System.out.println("line: " + line + " word count = " + wordCount);
                    line = reader.readLine();
            } catch (IOException e) {
                System.out.println("Unable to read next line");
         * Display the words and their count.
        private void displayHistogram() {
            System.out.println("Map of words: " + wordMap);
    }

  • Information in Histogram in Adobe Camera RAW

    Since I capture my images in RAW, when I open them in Adobe Camera RAW (via Elements 11), what information is displayed in the image and the histogram I see?
    Is it showing me the jpeg created in the camera?  If so, the jpeg settings in my camera are not only important in viewing the LCD and the histogram in my camera at the time of capture. They would also be important in viewing my image when it first opens in Adobe Camera RAW.
    Thanks for some input.
    Mary Lou

    I have an answer to this question supplied to me from a forum on www.luminous-landscape.com. It is as follows:
    Re: Understanding Camera RAW article
    « Reply #3 on: September 30, 2013, 05:20:22 PM »
    Reply Quote
    Quote from: mlfrost on September 30, 2013, 05:14:21 PM 
    Perhaps you can answer a related question on Camera RAW.  When I open an image captured in RAW format, I see an image and histogram in Adobe Camera Raw.  Am I correct in assuming that the opening image and histogram are created from the camera's jpeg settings?
    No...Camera Raw rips the entire raw image and does a demosaic and application of ACR defaults to generate the preview and the histogram (which is displaying the resulting graph based on the output color space set in ACR Workflow Options). ACR doesn't use ANY settings from the camera's JPEG settings and the only thing that ACR uses from the raw file is white balance info and the ISO metadata...

  • Add ability to use raw data in the Histogram and clipping indicators

    I have posted this as an ACR and Lightroom Feature Request at the Photoshop Family site.
    http://feedback.photoshop.com/photoshop_family/topics/raw_data_histogram_display_lightroom _and_adobe_camera_raw?rfm=1
    It was suggested I also post it here to for more visibility.
    "The current Histogram display in Lightroom and Adobe Camera Raw accurately display the file image data for JPEG, PNG, PSD, TIFF file types, but not for raw files.
    When a raw file is demosaiced and a camera profile applied it is no longer possible to determine the actual R-G-B-G2 raw data clipping levels. This is useful for determining best exposure settings (ETTR) when shooting tethered, evaluating exposure bracketed images, or for simply determining your camera's exposure metering accuracy.
    This can be added as a user-selectable option button in the current Histogram to allow viewing of the camera file's R-G-B-G2 raw data values."
    This has been requested in the past, but there appears to be mixed feelings and some confusion as to its benefits:
    http://forums.adobe.com/message/3967184#3967184
    The sole objective of  using the raw image file data in the Histogram is to determine if the image file contains clipped pixels. The actual raw data preview image is of no value other than to "accurately" display those pixels using the Highlight and Shadow clipping indicators. A good example of this implementation is the RawDigger application available for download here:
    http://www.rawdigger.com/

    Yes but it can be problematic in so far as some users find it can slow down their system. When you first switch it on it can take a while for all your files to be updated. If you're in the habit of making edits and adjustments to multiple selected images this too can slow things down. Anyway, to activate the it you'll, need to open
    Catalog Settings from the
    File menu, then set the
    Metadata: Automatically write changes into XMP to On - see attached screenshot.

  • Is it possible to export a histogram from labview to excel

    is it possible to export a histogram from labview to excel,and of course get a fancy one

    Hi achfire,
    The LabVIEW Report Generation Toolkit allows you to create different graphs in Microsoft Excel, including Bar Graphs.  Check out the Report Generation Toolkit section of the White Paper below for more information.  I've also linked to a section of the Report Generation Toolkit Help document which gives more details on the different types of graphs you can export.
    Moving Data From LabVIEW Into Excel: http://www.ni.com/newsletter/51339/en/
    Common Graph Types for Reports: http://zone.ni.com/reference/en-XX/help/370274G-01​/lvrgthelp/graph_types/
    Thanks,
    Myriam D.
    Applications Engineer
    National Instruments

  • No preview on external monitor and histograms black?

    Hi, im having a problem with previewing. In the upper left room i see the footage (also changing when grading) but the rest of the rooms and my preview monitor are black. Histograms are not working.
    Rendering and sending it to final cut works.
    Im using a blackmagic decklink card for the output of the external monitor. Footage comes from the RED, 2K.
    A colleague has the same mac pro but is using the older cinema screens. He has no problems. I use the new 24". Could that be the problem?
    Does anyone has a idea what is going wrong?
    Thanks.

    Ummmm.....
    mismatched display settings between COLOR and the BM card?
    jPo

  • Histogram works, Pie Chart doesn't :(

    I have a simple form, which has 1 block, a block level "when-new-block-instance" trigger and 2 bean_area under the block (beans don't have any trigger code). This simple form is called from within another form when a button is pressed. The histogram (bar chart) works, but the simple pie chart doesn't work (only displays a single circle - not the slices on the pie). The related trigger code is below. Can anybody see what is wrong with the pie chart code ?
    Appreciated.
    =====================================================================
    -- Set the bean area properties
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA1',1,'CLEAR_BLOCK','');
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA1',1,'GRAPHTYPE','VERTICAL_BAR');
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA1',1,'ENABLE_TOOLTIPS','VALUES');
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA1',1,'SET_DELIMITER','#');
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA1',1,'SET_TITLE','Order Count By WHIP#red#b#14');
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA1',1,'SET_FOOTER','WHIP Name#blue#12');
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA1',1,'SET_DELIMITER',',');
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA1',1,'SET_Y_LABEL','Move Your Mouse To View The Value For Each Bar');
    -- Use the following for a nice 3D look (if users want)
    -- SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA1',1,'SET_DEPTH','20,45');
    -- This should populate and display the data on the graph by using the related PJC
    DECLARE
    ordercount NUMBER(10);
    whipname VARCHAR2(25);
    vData VARCHAR2(200);
    vDelimiter VARCHAR2(1);
    cursor c1 is select distinct interface_name from pps_order order by interface_name;
    BEGIN
    vDelimiter := ',';
    open c1;
    fetch c1 into whipname;
    while (c1%found) loop
    select count(*) into ordercount from pps_order where interface_name=whipname;
    vData := 'Total Order Count Per WHIP'||vDelimiter||whipname||vDelimiter||ordercount;
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA1',1,'ADD_ROWDATA',vData);
    fetch c1 into whipname;
    end loop;
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA1',1,'ADD_DATA_TO_GRAPH','');
    close c1;
    END;
    -- THIS SECTION IS FOR THE PIE CHART
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA2',1,'CLEAR_BLOCK','');
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA2',1,'GRAPHTYPE','PIE_GRAPH');
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA2',1,'SHOW_PIE_LABELS','VALUE');
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA2',1,'SET_DELIMITER','#');
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA2',1,'SET_TITLE','Order Count By WHIP#red#b#14');
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA2',1,'SET_FOOTER','WHIP Name#blue#12');
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA2',1,'SET_DELIMITER',',');
    -- This should populate and display the data on the graph by using the related PJC
    DECLARE
    ordercount NUMBER(10);
    whipname VARCHAR2(25);
    vData VARCHAR2(200);
    vDelimiter VARCHAR2(1);
    cursor c2 is select distinct interface_name from pps_order order by interface_name;
    BEGIN
    vDelimiter := ',';
    open c2;
    fetch c2 into whipname;
    while (c2%found) loop
    select count(*) into ordercount from pps_order where interface_name=whipname;
    vData := 'Total Order Count Per WHIP'||vDelimiter||whipname||vDelimiter||ordercount;
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA2',1,'ADD_ROWDATA',vData);
    fetch c2 into whipname;
    end loop;
    SET_CUSTOM_PROPERTY('BLOCK1.BEAN_AREA2',1,'ADD_DATA_TO_GRAPH','');
    close c2;
    END;
    GO_ITEM('BLOCK1.CLOSE');
    This uses the FormsGraph.jar file implementation as you can see. I know Frank Nimphius is the only expert when it comes to FormsGraph.jar at Oracle, but currently he is on vacation - so no official support to an unofficial (unsupported) charting implementation - but I thought there might be others who have done this before.
    Can someone who implemented a pie chart share his/her code here - a simple pie chart, nothing fancy (like the one that comes with the graph90.fmb file, which I followed but did not figure out why my implementation is not working). Something with the vData string or number of vData strings requirement? no explanation in the FormsGraph.jar doc and I am not a java programmer to figure it out from the java source code. I am looking for a simple trigger code for the pie chart - not like "look at the forms90.fmb that comes with the demo package" kinda answer.
    Thanx
    Message was edited by:
    zaferaktan
    Message was edited by:
    zaferaktan

    Any idea ?

Maybe you are looking for

  • Using Wii on MBP

    Hi, I know it's possible to hook up playstations and other game consoles and use the macbook pro as a monitor, using a tv card with breakout cables (i.e. elgato USB sticks). Has anyone been able to successfully use a Wii, with its motion sensors, in

  • Strange display issues for previously healthy SWFs

    Many months ago I published SWFs via Xcelsius 2008 that were carefully tested and worked well.  This week, it came to my attention that these SWFs are now displaying strangely under a variety of browsers and Flash Player versions (latest version test

  • Is there a way to do this? and is it illegal?

    i saw this one post saying that there's this thing that's alot like youtube but you can download some of the videos to put on your ipod there's this live performance of the kill that i really want on my ipod but i can't get it on itunes and i'm despe

  • Starting poblem in oracle 10gXE

    i have problem with starting my oracle 10g. i am using windows 7 ultimate. but the proble is sarting oracle 10g. it look like as: C:\oraclexe\app\oracle\product\10.2.0\server\BIN>net start OracleXETNSListener+ *'net' is not recognized as an internal

  • Phone is unlocked put says sim failure

    my iphone was disconnected from its old server and I was told to put my current SIM card which was from from another phone into the iPhone and it keeps telling me that there is a sim failure. I followed the steps correctly but it won't work. Do I nee