The levels menu
This menu is generally about changing the contents of the pixels (their brightness levels in each channel) without rearranging the image geometrically.
- here. . This option appears on the levels menu for a RAW image, to automatically detect defective pixels and save a list of them as a comma-separated values (CSV) file. This option is intended to work on dark-frame images, ie, those captured with the camera lens cap on. Information about the use of this is available
- here. only appears as an option if the image has been loaded from a RAW format file. The option can only be used once, so it will be greyed out after that. It processes the raw data to interpolate the missing values between pixels so that there is a value for every channel at every pixel. It also stretches the contrast linearly so that 12 bits (or, on newer cameras, 14 bits) become 16. This generally will make visible an image which previously appeared to be black, though options from the measurement menu will have shown the prescence of some data. If a list of defective pixels is available in the configuration (having either been loaded from a file, from the configuration menu, or detected as in the previous option) the first step is to replace each of the defective pixels by the average of its 4 nearest neighbours of the same colour, then the interpolation and stretching is done. More information about defective pixels is available
- is an option which is only available if the current image has more than 8 bits per channel. It scales the values for all channels at all pixels, from the range 0..65535 to the range 0..255. It is necessary to do this before saving an image in JPEG format.
- TIFF reading software over the interpretation of whether the file is big- or little-endian. Java is big-endian, regardless of the physical platform it is running on. Some TIFF readers seeing a little-endian TIFF file correctly interpret the header data (metadata and file structure information) but then read the channel data (pixel values as if they were big-endian. TIFF readers come from the Java Advanced Imaging (JAI) project, so they should no longer need to be written by application developers like me. is another option which is only available if the image has 16 bits per channel. It simply swaps the upper and lower byte in each channel value of every pixel. This option has only been provided because of errors in some
- is an option which is only available if the current image has 8 bits per channel. It scales the values for all channels at all pixels, from the range 0..255 to the range 0..65535.
- is only available if the image has 3 channels. It sets every channel to have the same value at any pixel. The value is formed from 37.5% of the red value plus 50% of the green plus 22.5% of the blue. The number of channels is not changed but as they all then contain the same values everything is displayed in shades of grey.
- is only in the menu if the image has 3 channels (assumed to be red, green, blue. It creates new image frames, one for each channel of the current image. Each of the frames has only one channel set, the others having been cleared to 0. A red/green/blue (RGB) image therefore produces a red, a green and a blue image, in 3 new windows.
- reverses black and white and the shades in between, producing a negative of the image.
- finds the minimum and maximum value occurring in each channel, then does a linear stretch so that the minimum becomes level 0 and the maximum becomes the maximum possible for the number of bits available (255 for an 8-bit channel, 65535 for a 16-bit one). There is first a question asked: are all channels to be scaled the same? If the answer to this is "no", the stretching is calculated completely independently for each channel. That means that colour balance will not generally be preserved. On the other hand if the answer is "yes" the scaling is based on the global minima and maxima, of all channels, so colour balance is kept.
- See full details. .
- presents a dialogue comprising a graph on the left hand side and the central portion of the image on the right hand side. The graph represents a transfer function. Levels from black on the left to white on the right will be changed according to the curve on the graph. The vertical axis goes from black at the bottom to white at the top. The portion of image gives a preview of what will happen if the graph is modified. Pressing the mouse button on the graph inserts a point into the line which can then be dragged. As it is dragged the effect can be seen on the preview portion of the image at the right. At any time one of the points on the graph will be filled in black. Pressing the Delete key will delete that point from the graph and neighbouring points will be reconnected by a straight line. The dialogue also contains a drop-down for setting some standard curve shapes, including gamma correction curves for user-supplied values of gamma. The V-shaped curve can be used to change subtracted images into absolute-subtracted images (differences all converted to absolute values so the background level can be 0 instead of half-way up the range). If the OK button is clicked the effect of the curve is applied to the whole image.
- presents a dialogue comprising a preview portion from the centre of the image, with a slider bar beneath it. Dragging the slider to the left decreases colour saturation in the image until, at the left end of the scale, it becomes monochrome. Sliding to the right increases saturation until at the right end of the scale the image only contains fully saturated colours. If the OK button is clicked the saturation factor is applied to the whole image.
- displays a dialogue with a preview image in which each channel can be increased or decreased by a user-selected percentage. Beware when increasing a channel if it already goes up to the maximum level - you will get flattened highlights in that channel. If the OK button is clicked the chosen settings are applied to the whole image.
- first does statistics on the image to find the mode in each channel. It then determines which channel has the minimum modal brightness and scales the other channels so that their modes move down to that minimum level. This is intended for night sky images, in which the modal values relate to the background sky. The sky is commonly coloured by light pollution so this operation neutralises the colour by making the background levels all more or less the same. It does not affect the maximum level in each channel so bright objects will not change colour. Before version 9.11.19 of GRIP this option was called "Auto balance (equate modes)". It still does equate modes but it does it in a better way.
- here. For other kinds of images you may find it useful to apply other operations, such as inverting the contrast before thresholding. also presents a dialogue comprising a preview portion from the centre of the image, with slider bars beneath it. Some pixels in the image may have a red mask over them (in the overlaid GlassPane). The coloured pixels are those which have a level in any of their channels which is above a certain threshold value. Dragging the sliders adjusts the threshold level up (dragging to the right) or down (left). The effect is seen in the preview image. There are 3 separate sliders for red, green and blue channels. Thresholding can be applied in either of two ways: AND-ing the tests on each channel (every channel must be at or above the threshold level) or OR-ing them (any single channel may be at or above threshold). If the OK button is pressed, the thresholding is done on the whole image and the resulting mask in front of "detected" pixels will appear in green. In astrophotographs it is important to correct the background level before thresholding so that a single threshold level has the same effect right across the image. More on background correction is
-
goes a stage beyond thresholding. If thresholding has not yet been done (ie, there is no blue mask over the image yet) it presents the dialogue for that first, otherwise it goes straight into the next step which is to describe each contiguous group of detected pixels as an object. Our term for such an object is "blob". The result of detecting each blob, of which there may be thousands in the mask, is a set of data describing the boundary and another describing the enclosed area. The mask is wiped out by the detection process so you see the original image again. In astrophotographs this operation can detect stars and describe them as a list of blobs. After detecting blobs GRIP goes into "blob hovering" mode. In this mode, as you move the mouse over the image (without clicking any buttons) the position, area and integrated brightness of the nearest blob is displayed next to the cursor:
Clicking the mouse when in this mode creates a new image window (ImFrame) containing a magnified view of the nearest blob, plus an 8-pixel margin around it. Each pixel in the original image is replaced by an 8 x 8 square in the magnified image so the individual pixels may be seen clearly. The new window has its own menu, so you can go on to examine profiles by measuring lines across the blob. - is a further step after detecting blobs, to produce statistics of their area and brightness measurements. Area is the number of pixels detected. Brightness is the sum of the levels (all channels) for those pixels. Histograms are shown for each of those measurements, along with minimum, mean, mode, maximum and standard deviation for each. As usual for GRIP's measurements, the data can be saved as CSV or XML or the graphs may be printed.
- redraws the overlay, with the detected blob boundaries shown as blue lines. To appreciate this clearly, zoom the image to 100%.
- is a convenience option (the same as on the measurement menu) for erasing the blue overlay.
- returns to blob hovering mode if you have selected other options which have taken GRIP out of that mode.
- is for use as part of a process for measuring profiles along straight lines. This is particularly for spectroscopy. An outline of the method is as follows. Use a straight line measurement first to determine how much to rotate the image to make lines vertical. Rotate the image by the measured angle. Crop the image so that it only includes the portion to be measured. Then use the present option. Finally measure a horizontal straight line.
- here. displays the present page if you have installed files as described