Detecting corners in an image

I am currently trying to detect the corners in an image using a tecnique called Harruis Corner detector, I am using some code in Matlab to help me do this but it is not working.
Below I have the code in java and MatLab
Below is my code in java
private int[] pixels;
private int[] grey_scale_image;
private double[][] greylevels;
private BufferedImage image;
private Image result_image;
private int[] convolvedImage;
Point[] corners = new Point[100];
Pixel[][] pixelObjects = new Pixel[256][256];
int[][][] data;// = new int[][][];
double[] result223;
* Constructor for objects of class HarrisCorner
public HarrisCorner(BufferedImage image) {
this.image = image;
int width = image.getWidth();
int height = image.getHeight();
pixels = new int[width * height];
grey_scale_image = new int[pixels.length];
handlepixels(image, 0, 0, width, height);
greylevels = new double[width][height];
for (int j = 0; j < height; j++) {
for (int i = 0; i < width; i++) {
greylevels[i][j] = grey_scale_image[j * width + i];
double[][] kernel = {{-1, 0, 1} , {-1, 0, 1}, {-1, 0, 1}}; // -1 0 1; -1 0 1; -1 0 1 / 3 (look into that)
// print(kernel);
System.out.println("\n\n");
double[][] kernel1 = {{-1, -1, -1} , { 0, 0, 0}, {1, 1, 1}};
double[][] smooth_kernel = {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}};
Matrix Ix = new Matrix(convolution2D(greylevels, width, height, kernel,
kernel.length, kernel[0].length));
Matrix Iy = new Matrix(convolution2D(greylevels, width, height, kernel1,
kernel.length, kernel[0].length));
System.out.println(Ix.getArray().length + " " + Ix.getArray()[0].length);
System.out.println(Iy.getArray().length + " " + Iy.getArray()[0].length);
Matrix Ixy = Ix.times(Iy);
Matrix Ix2 = Ix.times(Ix);
Matrix Iy2 = Iy.times(Iy);
Matrix Ixy2 = Ixy.times(Ixy);
//compute kernel using guassain smoothing operator guassain_kernel()
Matrix GIx2 = new Matrix(convolution2D(Ix2.getArray(),
Ix2.getArray().length,
Ix2.getArray()[0].length,
guassain_kernel(), smooth_kernel.length,
smooth_kernel[0].length));
Matrix GIy2 = new Matrix(convolution2D(Iy2.getArray(),
Iy2.getArray().length,
Iy2.getArray()[0].length,
guassain_kernel(), smooth_kernel.length,
smooth_kernel[0].length));
Matrix GIxy2 = new Matrix(convolution2D(Ixy2.getArray(),
Ixy2.getArray().length,
Ixy2.getArray()[0].length,
smooth_kernel, smooth_kernel.length,
smooth_kernel[0].length));
//c = (GIx2 + GIy2) - 0.04 * (GIx2 .* GIy2 - GIxy2.^2);
Matrix M = (Ix2.plus(Iy2)).minus( ( (Ix2.times(Iy2)).minus(Ixy2.times(Ixy2))).times(0.04));
//Matrix detM = (Ix2.times(Iy2)).minus(Ixy2.times(Ixy2));
//Matrix traceM = Ix2.plus(Iy2);
//Matrix M = detM.minus((traceM.times(traceM)).times(0.04));
// double[] row2 = M.getRowPackedCopy();
// Arrays.sort(row2);
// double theCorner = row2[row2.length-100];
// System.out.println("theCorner" +theCorner);
// double[][] responses = M.getArray();
// for(int i = 0; i < responses.length; i++) {
// for(int j = 0; j < responses[0].length; j++) {
// if(responses[i][j] <= theCorner)
// responses[i][j] = 0;
//double[][] ww = M.getArray();
double[][] cr22 = wrapBorder(Iy.getArray());
//double[][] corner_response = wrapBorder(responses);
result223 = new double[pixels.length];
for (int j = 0; j < greylevels[0].length; ++j) {
for (int i = 0; i < greylevels.length; ++i) {
pixelObjects[i][j].setValues(i,j,cr22[i][j]);
if(corner_response[i][j] != 0) {
//cr22[i][j] =
result223[j * (greylevels.length) + i] = -1;//((Color.red).getRGB());//cr22[i][j];
else
result223[j * (greylevels.length) + i] = cr22[i][j];//greylevels[i][j];
//System.out.println((Color.red).getRGB());
//scaleAllGray(result223);
convolvedImage = doublesToValidPixels(result223);
for (int i = 0; i < corners.length; i++) {
int index = row2.length - corners.length + i;
double pixel = row2[index];
for(int h = 0; h < 256; h++) {
for(int w = 0; w < 256; w++) {
Pixel p = pixelObjects[w][h];
if(p.getPixel() == pixel) {
corners[i] = new Point(p.getX(),p.getY());
//if(i==99) break;
This is the code in Matlab :
% % HISTORY
% 2001 Philip Torr ([email protected], [email protected]) at Microsoft
% Created.
% Copyright � Microsoft Corp. 2002
% REF:     "A combined corner and edge detector", C.G. Harris and M.J. Stephens
%     Proc. Fourth Alvey Vision Conf., Manchester, pp 147-151, 1988.
%%to do: we might want to make this so it can either take a threshold or a fixed number of corners...
% c_coord is the n x 2 x,y position of the corners
% im is the image as a matrix
% width is the width of the smoothing function
% sigma is the smoothing sigma
% subpixel = 1 for subpixel results (not implemented yet)
%%%%%bugs fixed Jan 2003
function [c_coord] = torr_charris(im, ncorners, width, sigma, subpixel)
if (nargin < 2)
error('not enough input in charris');
elseif (nargin ==2)
width = 3; %default
sigma = 1;
end
if (nargin < 5)
subpixel = 0;
end
mask = [-1 0 1; -1 0 1; -1 0 1] / 3;
% compute horizontal and vertical gradients
%%note because of the way Matlab does this Ix and Iy will be 2 rows and columns smaller than im
Ix = conv2(im, mask, 'valid');
Iy = conv2(im, mask', 'valid');
% compute squares amd product
Ixy = Ix .* Iy;
Ix2 = Ix.^2;
Iy2 = Iy.^2;
Ixy2 = Ixy .^2;
% smooth them
gmask = torr_gauss_mask(width, sigma);
%gim = conv2(im, gmask, 'valid');
%%note because of the way Matlab does this Ix and Iy will be width*2 rows and columns smaller than Ix2,
% for a total of (1 + width)*2 smaller than im.
GIx2 = conv2(Ix2, gmask, 'valid');
GIy2 = conv2(Iy2, gmask, 'valid');
GIxy2 = conv2(Ixy2, gmask, 'valid');
% computer cornerness
% c = (GIx2 + GIy2) ./ (GIx2 .* GIy2 - GIxy2 + 1.0);
%%%one problem is that this could be negative for certain images.
c = (GIx2 + GIy2) - 0.04 * (GIx2 .* GIy2 - GIxy2.^2);
%figure
%imagesc(c);
%figure
%c is smaller than before got border of 2 taken off all round
%size(c)
%compute max value around each pixel
%cmin = imorph(c, ones(3,3), 'min');
%assuming that the values in c are all positive,
%this returns the max value at that pixel if it is a local maximum,
%otherwise we return an arbitrary negative value
cmax = torr_max3x3(double(c));
% if pixel equals max, it is a local max, find index,
ci3 = find(c == cmax);
cs3 = c(ci3);
[cs2,ci2] = sort(cs3); %ci2 2 is an index into ci3 which is an index into c
%put strongest ncorners corners in a list cs together with indices ci
l = length(cs2)
lb = max(1,l-ncorners+1);
cs = cs2(lb:l);
ci2s = ci2(lb:l);
ci = ci3(ci2s);
corn_thresh = cs(1);
disp(corn_thresh);
%row and column of each corner
[nrows, ncols] = size(c);
%plus four for border
% c_row = rem(ci,nrows) +4;
% c_col = ( ci - c_row )/nrows + 1 +4;
border = 1 + width;
c_row = rem(ci,nrows) + border;
c_col = ( ci - c_row +2)/nrows + 1 + border;
% %to convert to x,y we need to convert from rows to y
c_coord = [c_col c_row];
%see Nister's thesis page 19.
if subpixel
disp('subpixel not done yet')
end
%display corners....
%hold on
%          plot(c_col, c_row, '+');
%          plot(c_coord(:,1), c_coord(:,2), '+');
% hold off
%index runs
% 1 4
% 2 5\
% 3 6
%ci = ci + 4 * nrows + 4;
%ci = (nrows + 4) * 4 + 4 + ci;
%c_patches = [gim(ci - nrows) gim(ci - nrows-1) gim(ci - nrows+1) gim(ci-1) gim(ci) gim(ci+1) gim(ci+nrows) gim(ci+nrows+1) gim(ci+nrows-1)];
% hold on
%      imagesc(im);
%          plot(c_col, c_row, 'sw')
% hold off
%      size(im)
%           size(cp)
%          imr = im2col(im, [5,5])';
%          im_corr = imr(ci);
%      im(c_row(:)-1, c_col(:)-1)
%          each row is a 3x3 matrix
%      c_patches = [ im(c_row-1, c_col-1) im(c_row-1, c_col) im(c_row-1, c_col+1) ...
% im(c_row, c_col-1) im(c_row, c_col) im(c_row, c_col+1) ...
% im(c_row+1, c_col-1) im(c_row+1, c_col) im(c_row+1, c_col+1) ];
%c_patches = [im(ci-1) im(ci) im(ci+1)];
%c_patches = [im(ci)];
Any help would greatly appreciated

Did you see the button labelled "code" between the subject textfield and the message textarea in the submission form? It allows you to post legible code samples...

Similar Messages

  • Adobe Lens Profile Creator - ERROR (Detect corners failed because file reading errors ocurred)

    1) I have successfully created a lens profile for a Nikon AF Micro Nikkor 40mm 2.8 lens used in a Nikon D5200 Camera. For this I converted the raw .nef files to .DNG first using Adobe's DNG Converter.
    2) When trying to create another lens profile using the EXACT SAME .DNG files as posted in 1), I am no longer able to create a lens profile because of the message "Detect corners failed because file reading errors ocurred". I am also unable to create any other lens profile using different photos.
    3) I have also tried using a fresh install of Adobe Lens Profile Creator in another mac and I get the exact same error.
    4) I AM ABLE to create a lens profile if I use .jpg files (generated from the same raw .nef files as mentioned) but this doesn't help because then the profiles don't show up when trying to open a raw file in Adobe Camera Raw.
    Please help as this is exasperating.
    Thank you.

    Thanks! I had the same error message in Adobe Lens Profile Creator 1.0.4 for OSX and I found the problem to be the letter ö in the folder name for the DNGs. The lens is an old ISCO-Göttingen and the progress stopped at 2% with the mentioned error message. Changed the folder name and now it works!

  • Detecting rectangles in an image

    Hi
    Can someone plz help me (preferrably with some code) to [1]detect rectangles in an image, and [2] for instance place a marker (eg. color pixel red) in the bottom left hand corner of all the rectangles detected. The image is in greyscale and edge detection is already preformed on the image. I would also like to [3] detect rectangles that are skew eg. when the image is taken at an angle.
    Any help will be greatly appreciated.

    Plz don't cross-post

  • Rounding the corners on an image

    Hi
    Is there a simple way to round the corners on an image?
    The way I do it (like on the front page of http://www.villasfloridavillas.com) seems way too complicated...
    Sorry if this is a really dumb question!
    Cheers
    RD

    A really flexible way to approach this is to create a path with the Shape tool (U or Shift-U). In your situation, of course, use the Rounded Rectangle tool as D Fosse already suggested. Or, use any closed path you might want to create, using any other tools.
    If you need to, use the Free Transform tool (Ctrl-T / Command-T) and/or the Direct Select tool (A) to position, distort, reshape, scale, etc. This can include tweaking the roundedness of the shape you just created, rounding just certain corners, etc.
    Then, with the Direct Select tool (A) active, right-click the image and choose Make Selection.
    Then, press Ctrl-J (Command-J) to create a new layer cropped to the contents of the shape.
    So the sequence is really simple and easy to remember: Shape, Select, Jerk.
         Make a shape,
         Make the shape into a selection,
         Ctrl-J (Command-J).
    Note that after you have made the shape into a selection, it only affects the current view. So you can turn layers on and off in the Layers panel, or move the selection around around, and crop out identically-sized chunks of anything on any layer. The Ctrl-J technique makes this fast and efficient.
    Bart Cross's "smoothed marquee" technique is pretty cool, though, if you only need rounded corners. However, be careful not to make the original marquee fit the entire image. The marquee will snap to the outer edges, and then the Smooth option will become unavailable. There has to be a pixel or two outside the marquee to enable all the Select / Modify choices (at least this is true in CS4).

  • How to make rounded corners of the image?

    Hi,
    I have arbitrary images which i need to change in the following way.
    1. Make the corners of the images a little bit rounded
    2. Pixels must be transparent such that the background can be seen.
    Thanks.

    import java.awt.*;
    import java.awt.geom.RoundRectangle2D;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class RoundingImages extends JPanel {
        BufferedImage image;
        RoundingImages(BufferedImage src) {
            image = roundCorners(src, 50);
        private BufferedImage roundCorners(BufferedImage src, int r) {
            int w = src.getWidth();
            int h = src.getHeight();
            int type = BufferedImage.TYPE_INT_ARGB;
            BufferedImage dst = new BufferedImage(w, h, type);
            Graphics2D g2 = dst.createGraphics();
            RoundRectangle2D r2 = new RoundRectangle2D.Double(0,0,w,h,r,r);
            g2.setClip(r2);
            g2.drawImage(src, 0, 0, this);
            g2.dispose();
            return dst;
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            int x = (getWidth() - image.getWidth())/2;
            int y = (getHeight() - image.getHeight())/2;
            g.drawImage(image, x, y, this);
        public static void main(String[] args) throws IOException {
            String path = "images/cougar.jpg";
            BufferedImage image = ImageIO.read(new File(path));
            RoundingImages test = new RoundingImages(image);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(test);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • Macbook Pro 13' (2010) MDp to HDMI detects monitor but no image

    I bought a Mini Display Port to HDMI to hook it up to one of my Dell 2408WFP monitors. The Mac detects the display just fine and my USB ports on my monitor work because I'm using a external mouse and keyboard. However there is no image on screen. I just bought my first Mac a couple days ago for college I need this to work. I have went though a lot of the settings I think.

    I recently tried the same thing and had no luck getting audio without a separate cable.
    I now have a problem.  After using the headphone jack to my tv for several hours, I now have no audio to my macbook internal speakers. 
    System Preferences>Sound>Output tab shows only 1 device for sound output; Digital Out.  And in the Settings for Selected Device it reads: "The selected device has no output controls"
    The volume icon on the menu bar is gray-doesn't work.
    Any advice here?

  • Illustrator not able to round corners properly (w/ image sample)

    When designing a logo, I want to be able to round corners properly, i.e. mathematically. When I specify a radius of 20 mm, I expect a radius of 20 mm, not various random radiuses. Illustrator simply isn't capable of doing this properly. I find this very strange, as this is the leading vector editing tool for designing logos (among others).
    As a result of this, I've developed my own "manual" method of doing this, but it takes some time, and it's not elegant.
    This image should be a little explanatory:
    http://img5.pictiger.com/948/17886618.gif?u=1237767818
    (Note: When rounding corners, Illustrator doesn't even produce circular arcs -- they're a little deformed.)
    Surely this can't be the way it's supposed to work? Anybody from Adobe care to answer?

    Sorry for the bad link. Here's the image again, with alternates (in case the others go down):
    http://s5.tinypic.com/2rfpudw.jpg
    http://img147.imageshack.us/img147/7021/roundingcorners.gif
    http://img11.imageshack.us/img11/5610/roundingcorners01.jpg
    b Please note:
    * The blue dotted circles in the Illustrator-example on the left represents
    i the "imaginary circles"
    that Illustrator uses when rounding corners.
    * The "manual method" on the right, shows what you'd actually expect Illustrator's Round Corners to do.
    @Harron K. Appleman:
    -I'm on CS4 and use both Vista and OSX (but that doesn't really matter, as this also applies to earlier versions of Illustrator).
    -I'm using the
    i Effects > Stylize > Round Corners.
    In the example I've used a simplified shape, to make it more clear what I mean.

  • How to make rounded corners in spry image slideshow

    It says it can do it using slices but there are no great instuctions anywhere to be found with detail on how to do it.
    Any body know whixh file and what part of the code to change so the frontend on the website the corners are rounded?

    import java.awt.*;
    import java.awt.geom.RoundRectangle2D;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class RoundingImages extends JPanel {
        BufferedImage image;
        RoundingImages(BufferedImage src) {
            image = roundCorners(src, 50);
        private BufferedImage roundCorners(BufferedImage src, int r) {
            int w = src.getWidth();
            int h = src.getHeight();
            int type = BufferedImage.TYPE_INT_ARGB;
            BufferedImage dst = new BufferedImage(w, h, type);
            Graphics2D g2 = dst.createGraphics();
            RoundRectangle2D r2 = new RoundRectangle2D.Double(0,0,w,h,r,r);
            g2.setClip(r2);
            g2.drawImage(src, 0, 0, this);
            g2.dispose();
            return dst;
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            int x = (getWidth() - image.getWidth())/2;
            int y = (getHeight() - image.getHeight())/2;
            g.drawImage(image, x, y, this);
        public static void main(String[] args) throws IOException {
            String path = "images/cougar.jpg";
            BufferedImage image = ImageIO.read(new File(path));
            RoundingImages test = new RoundingImages(image);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(test);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • How do I create rounded corners on an image in CS6?

    Hello There!
    In the previsous version of Photoshop, I use to do the following so that my pictures had rounded corners:
    Open a picture
    Click the layer mask button twice
    Then use the rectangle tool to get my rounded corners on the preloaded image - Presto, all done!
    This does not work in CS6.  Does anyone have a better method?  I just want to have rounded corners (radius 5) to my photos.
    Thank you so much for your help!
    -K

    You can still use a Rounded Rectangle for a vector layer mask.
    Draw your path first, then choose Layer - Vector Mask - Current Path
    -Noel

  • Detecting the type of Image added to SWF

    I am adding an image dynamically to my SWF. Is it possible to figure out that whether the uploaded image is black & white or gray-scale or colored?

    There are surely different, and possibly better, ways to do this, but this has worked pretty reliably for me before. I just take a diagonal strip of pixels and compare the rgb values. If the rgb components of any pixel vary too much it's pretty guaranteed it's a color pixel - a grayscale pixel's components are all pretty much the same - ie 100,100,100 vs something like 100,10,0 in a red tinted pixel...
    function check(bmd:BitmapData):void
                var yRatio = bmd.height / bmd.width;
                var c:uint;
                var red:uint;
                var green:uint;
                var blue:uint;
                var fail:Boolean = false;
                for (var i:int = 0; i < bmd.width; i++) {
                    c = bmd.getPixel(i, Math.floor(i * yRatio));
                    red = c >> 16 & 0xFF;
                    green = c >> 8 & 0xFF;
                    blue = c & 0xFF;           
                    var variance:int = 5;
                    if (red != green || red != blue) {
                        if (Math.abs(red - green) > variance) {
                            fail = true;
                        if (Math.abs(red - blue) > variance) {
                            fail = true;
                        if (Math.abs(green - blue) > variance) {
                            fail = true;
                        if (fail) {                       
                            break;
                if (fail) {
                    trace("not a black and white");
                }else{
                    trace("Black and white image - possibly sepia tone");

  • Loop to detect which mc an image was dragged into and snap image   to it

    Hi All,
    I have an 'onMouseUp' code that will snap a dragged image
    into an mc target.
    If I hardcode the target it works fine for that one mc
    target, but if I
    try to put it into some kind of loop to add the code for all
    the mc
    targets, it won't work.
    If I hardcode it like it is, i get the trace "hello"
    perfectly, if I put
    it in a for loop, I get no "hello".
    I could use a 'case' and hardcode all the eventualities, but
    I was
    wondering how I could do it more dynamically using a loop to
    catch all
    the mc targets.
    Any help much apreciated,
    Jeff C.
    My code:
    // constants
    var NPICS:Number = 5; // number of pictures to load
    var THUMBW:Number = 82; // width of each thumbnail
    var THUMBH:Number = 82; // height
    var MARGIN:Number = 10; // margin between thumbnails
    _global.dragpic = ""; //name of pic being dragged
    // index into pictures array, used for loading
    var ipic:Number;
    var thispic:String;
    // set up loader, an instance of MovieClipLoader
    var loader:MovieClipLoader = new MovieClipLoader();
    // use the main timeline to listen to and respond to loader's
    broadcast
    events
    loader.addListener(this);
    var myMCL = new MovieClipLoader();//create an instance of
    MovieClipLoader
    function onLoadInit(_mc:MovieClip) {// this gets done when
    the jpg is
    completely loaded:
    _mc._width = THUMBW;
    _mc._height = THUMBH;
    trace(_mc.getDepth())
    _mc.onMouseDown = function(){
    if (this.hitTest(_xmouse, _ymouse,true)) {
    var nm:String = this._name
    var nextDepth:Number = getDepth();
    this.swapDepths(getNextHighestDepth());
    this.startDrag(true);
    _global.dragpic = this._name;
    }//end of mousedown
    _mc.onMouseUp = function(_mc){
    this.swapDepths(nextDepth);
    this.stopDrag ();
    if(this.hitTest(tgt1)){// what target ** tgt1 is
    hardcoded - want it dynamic!
    trace("hello");
    this._y = tgt1._y-(this._height/2);
    this._x = tgt1._x-(this._width/2);
    }//end of mouseup
    function init() {
    //create the targets for drop
    for (var a:Number=1; a<=4; a++ ){ //loop to load 3
    pictures
    //attach targetmc and give each one the name tgt1, tgt2, etc
    var mctg:MovieClip = this.attachMovie("targetmc", "tgt" + a,
    100+a);
    //position each one in a row -
    //(border+(half width)) + (no of image) X (image
    width+border)
    mctg._x=(10+(mctg._width*.5)) + ((a-1)*(10 + mctg._width));
    mctg._y=250;
    //****end of targets code ****
    // create holder for pictures
    // make empty movieclips in thumbs_mc for each pic to go
    into
    for (var i:Number = 0; i < NPICS;) {
    i++ //important to leave this out of the for()
    var mc:MovieClip = this.createEmptyMovieClip("mc"+i, i+1);
    if(i<4){
    mc._x = MARGIN + (i-1)*(MARGIN + THUMBW);
    mc._y = MARGIN;
    if (i>3){ //start a new row after 3rd mc
    mc._x = MARGIN + (i-4)*(MARGIN + THUMBW);
    mc._y = (MARGIN*2) + THUMBH;
    // set the pointer to the first jpg
    thispic = "pic"+i+".jpg";
    ipic = 0; //changes the x postion of pic
    // start loading jpgs
    loader.loadClip(thispic, "mc"+i);
    //CALL THE INIT FUNCTION TO START THE MOVIE
    init();

    You are in recover mode.  You need to do what your iPad is telling you to do.  Connect it to your computer via USB and follow the instructions in the link I provided.  Be advised, recover mode often required you to do this multiple times to get it to work. 
    http://support.apple.com/kb/HT1808

  • How to Detect Image Compression

    In an existing document from somebody else, how can I detect what type of image compression was used, such as JBIG2?

    In an existing document from somebody else, how can I detect what type of image compression was used, such as JBIG2?

  • Image processing doesn't show

    Hi!
    I am trying to do image processing, where it will detect the object and box it up when detected. 
    However, I did not manage to detect the object, which in this case, a masking tape.
    Can anyone tell me what is wrong and how to solve it?
    Below is the attached VI that I have done.
    Attachments:
    multicam+image processing.vi ‏106 KB

    No. This is just for testing purpose. I don't have the actual image as it is for an obstacle in a competition.
    However, the obstacle is also a ring as well. 
    I just found a way to detect the object.
    I used geometric matching instead of pattern matching, but it was able to detect other things such as my laptop as well.
    Is there a way to detect the image and change the diameter of the ring so that it is able to detect other rings with a larger diameter?
    Thanks for your help.
    Attached below are the changes i have made and the images it detected.
    Attachments:
    multicam+image processing.vi ‏110 KB
    correct image.png ‏455 KB
    wrong image.png ‏499 KB

  • Images (w/correct meta data) are in catalog and on disk, but LR 5.7 considers them new on Import

    For reasons explained below, I want to try to re-import all my images into LR and hope that none/few are in fact considered new and are imported.  Yet, for some folders, LR is apparently unable to detect that my source images are already in the catalog, and are on disk, and that the source file meta data matches what LR knows about the images.  When I click an image in LR and Show in Finder, I do see the imported image on disk.  I can edit the image in the Develop module.  So, it seems good, but all is not well.   Sorry for the long post here, but I wanted to provide as much info as I could, as I am really seeking your help, which I'd very much appreciate.
    Here are some screen shots that illustrate the problem:
    Finder contents of the original images
    LR folder hierarchy
    an image as seen in LR
    Finder content of external LR copy of images
    import showing 10 "new" photos
    The original images ... (I'm not sure why the file date is April 2001 but the actual image date is January 2011; I may have just used the wrong date on the folder name?)
    The LR folder hierarchy ...
    An image as seen in LR ...
    The external folder containing the images in the LR library
    But on import of the original source folder, LR sees 10 "new" photos ...
    I tried "Synchronize Folder ..." on this particular folder, and it simply hangs half-way through as seen in the screen shot below.   IS THIS AN LR BUG?   This is really odd, since "Synchronize Folder ..." on the top-level folder completes quickly.
    I have a spreadsheet of of the EXIF data for the original files and those created by LR.  (I extracted this info using the excellent and free pyExifToolGui graphical frontend for the command line tool ExifTool by Phil Harvey.)   Almost all of the Exif data is the same, but LR has added some additional info to the files after import, including (of course) keywords.  However, I would not have expected the differences I found to enter into the duplicate detection scheme.  (I didn't see a way to attach the spreadsheet to this posting as it's not an "image".)
    I'm running LR 5.7 on a 27" iMac with Yosemite 10.10.2, having used LR since LR2.  I have all my original images (.JPEGs and RAWs of various flavors) on my internal drive on the Mac.   To me this is like saving all my memory cards and never re-using them.   Fortunately, these files are backed up several ways.   I import these images (copying RAWs as DNG) into LR with a renaming scheme that includes the import number, original file creation date and original file name.   There should be one LR folder for each original source file folder, with the identical folder name (usually a place and date).  I store the LR catalog and imported images on an external drive.  Amazingly and unfortunately my external drive failed as did it's twin, same make/size drive that I used as a backup with Carbon Copy Cloner.   I used Data Rescue 4 to recover to a new disk what I thought was almost all of the files on the external drive.
    So, I thought all would be well, but, when I tried "Synchronize Folder" using the top-level folder of my catalog, the dialog box appeared saying there were over 1000 "New" photos that had not been imported.  This made be suspicious that I had failed to recover everything.   But actually things are much worse than I thought..   I have these counts of images:
    80,0061 files in 217 folders for my original source files (some of these may be (temporary?) copies that I actually don't want to import into LR)
    51,780 files in 187 folders on my external drive containing the LR photo library
    49,254 images in the top-level folder in the LR catalog (why different from the external file count?)
    35,332 images found during import of the top-level folder containing original images
    22,560 images found as "new" by LR during import
    1,074 "new" images reported by Synchronize Folder ... on the top-level folder in the catalog; different from import count
    Clearly things are badly out of sync.   I'd like to be sure I have all my images in LR, but none duplicated.   Thus, I want to try to import the entire library and have LR tell me which photos are new.  I have over 200 folders in LR.  I am now proceeding to try importing each folder, one at a time, to try to reconcile the differences and import the truly missing images.  This will be painful.  And it may not be enough to fully resolve the above discrepancies.
    Does anyone have any ideas or suggestions?  I'd really appreciate your help!
    Ken

    Thanks for being on the case, dj!   As you'll see below, YOU WERE RIGHT!      But I am confused.
        1. Does the same problem exist if you try to import (not synchronize) from that folder? In other words, does import improperly think these are not duplic
    YES.  Import improperly thinks they are NOT duplicates, but they are in fact the same image (but apparently not the EXACT SAME bytes on disk!)
        2. According to the documentation, a photo is considered a duplicate "if it has the same, original filename; the same Exif capture date and time; and the same file size."
    This is my understanding too.
        3. Can you manually confirm that, for an example photo, that by examining the photo in Lightroom and the photo you are trying to synchronize/import, that these three items are identical?
    NO, I CAN'T!  The ORIGINAL file name (in the source folder) is the SAME as it was when I first imported that folder.  That name is used as part of the renaming process using a custom template. However, the file SIZES are different.    Here is the Finder Get Info for both files.  Initially, they appeared to be the same SIZE, 253KB, looking at the summary. But, if you look at the exact byte count, however, the file sizes are DIFFERENT: 252,632 for the original file and 2252,883 for the already-imported file:
    This difference alone is enough to indicate why LR does not consider the file a duplicate.
    Furthermore, there IS one small difference in the EXIF data regarding dates ... the DateTimeOriginal:
                                                                                                     CreateDate              DateTimeDigitized                    DateTimeOriginal              FileModifyDate                              ModifyDate
    ORIGINAL name: P5110178.JPG                                     2001:05:11 15:27:18    2001:05:11 15:27:18-07:00        2001:01:17 11:29:00        2011:01:17 11:29:00-07:00       2005:04:24 14:41:05  
    After LR rename:  KRJ_0002_010511_P5110178.JPG    2001:05:11 15:27:18    2001:05:11 15:27:18-07:00        2001:05:11 15:27:18        2011:01:17 11:29:02-07:00       2005:04:24 14:41:05
    So ... now I see TWO reasons why LR doesn't consider these duplicates.   Though the file NAME is the same (as original), the file sizes ARE slightly different.  The EXIF "DateTimeOriginal" is DIFFERENT.   Therefore, LR considers them NOT duplicates.
         4a. With regards to the screen captures of your images and operating system folder, I do not see that the filename is the same; I see the file names are different. Is that because you renamed the photos in Lightroom (either during import or afterwards)?
    I renamed the file on import using a custom template ...
            4b. Can you show a screen capture of this image that shows the original file name in the Lightroom metadata panel (it appears when the dropdown is set to EXIF and IPTC)?
    SO ....
    The METADATA shown by LR does NOT include the ORIGINAL file name (but I think I have seen it displayed for other files?).  The File SIZE in the LR metadata panel (246.96 KB) is different from what Finder reports (254 KB).  There are three "date" fields in the LR metadata, and five that I've extracted from the EXIF data.   I'm not sure which EXIF date corresponds to the "Data Time" shown in the LR metadata.
    I don't understand how these differences arose.   I did not touch the original file outside LR.   LR is the only program that touches the file it has copied to my external drive during import.  (though it was RECOVERED from a failed disk by Data Rescue 4),
    NOW ...
    I understand WHY LR considers the files different (but not how they came to be so).  The question now is WHAT DO I DO ABOUT IT?   Is there any tool I can use to adjust the original (or imported) file's SIZE and EXIF data to match the file LR has?  Any way to override or change how LR does duplicate detection?
    Thanks so very much, dj.   Any ideas on how to get LR to ignore these (minor) differences would be hugely helpful.

  • How to prevent degradation of image quality when pasting for collage?

    I am trying to do a collage (of family heirloom old pharmacy jars and bottles) from – eventually – about a dozen separate images in Photoshop CS6.  (A variety of sizes, resolutions, qualities and file types will go into the collage, but I wish to retain the image quality of each component at its original level or very close to the original level, even those in some cases the original quality is marginal.)
    I have set up in Photoshop a “background document” at 300 dpi of the right dimensions to paste into my InDesign document (5.1 X 3.6 cm)
    I have tried >six approaches, all of which have resulted in a degradation of the subsequently pasted-in image (not just slight, but very obvious).
    Clearly I’m missing something fundamental about image quality and handling images so that degradation is minimised or eliminated.
    (1) (1)   Using an internet video as a guide – using Mini Bridge to open all the images in PS6 as tabs along the top of the workpage.  Then dragging the first one into the base document.  It comes across huge – ie I only see a small fraction of the image.  Any attempt to Edit/Transform/Scale (to 14% of the pasted image, which in this case is a jpg of 3170 x 1541 at 1789 dpi, 4.5 x 2.2 cm) results in an image that looks horribly degraded compared with what I pasted (open in another window).
    (2)   (2) Same thing happens if I have each image as a new layer on top of the base document.
    (3)  (3)  I tried changing the image that I had put into Layer 2 into a Smart Object and then resized it.  No further ahead – it still looks horrible.
    (4) using a different image [an 800 dpi JPG 3580 x 1715  Pixels, print size (from dpi) 11.4 x 5.4 cm which despite those parameters is of barely acceptable quality] I have tried (a) changing the resolution to 300 dpi, (b) keeping the number of pixels the same (which results in a dpi of over 3000 but doesn't fix the problem; (c) changing the dimensions to a length of 3 cm [about right for the collage] .... but no matter what I do, by the time the image is positioned correctly on the layer, the image quality has gone from barely acceptable to absolutely horrible. That usually happens during the final resizing (whether by numbers or shift-dragging the corners of the image).
    Grateful for any step-by-step strategy as to how best to accomplish the end – by whatever means.  (Or even in a different program!).  Basically, even though I've used images for many years in many contexts, I have never fundamentally understood image size or resolution to avoid getting into such messes.  Also, I'm on a very steep learning curve with Photoshop, InDesign and Illustrator all at the same time - these all seem to handle images differently, which doesn't help.  [Not to mention MS Publisher, which I'm locked into for certain other things...]

    For the individual images, don't worry about the ppi or as you call it dpi (ppi is the correct term BTW) only worry about the pixel dimensions. If the pixel dimensions gets too low, it will look horrible as there is not enough data to work with.
    Therefore the final document that will house all the other images must be large enough in pixel dimensions to handle the smaller images at a high enough dimension that they will look good.
    That being said, if you can load your images in as smart objects as any scaling that takes place samples the original sized document. Making it possible to scale it down to a size that is barely visible and then reset the size back to where it was and have no loss of data.
    Where the ppi will come into play is when you are ready to print the final document, that is when the ppi will tell the printer at what size to print the document on the page.
    If your collage will span more than one page, you may want to do this in InDesign. All images are linked to their respective container (similar process as smart object in theory) Though I beleive smart objects are embedded which is debatable.
    In both InDesign and Illustrator, scaling the image in the document affects the ppi of the image, scaling down would increase the ppi whereas scaling upward would decrease the ppi as the number of pixels (the pixel dimension) has not changed.
    With photoshop, you have a choice, when scaling the entire document, you have the option to resample the image, doing so affects the pixel dimension and in that instance would degrade the image when scaling downward and bluring the image when scaling up. As photoshop is removing pixels when scaling down and guessing the neighbor pixels should be when scaling upward.
    But, when resampling is off, the pixel dimensions do not change and therefore there is no degration or bluring.
    Why this happens has to do with simple math.
    inches x ppi = pixels
    Knowing any two of the above forumula will give you the third.
    When resampling is enabled, the pixels can change and when it is disabled, it is fixed so only the other two values can change.

Maybe you are looking for

  • How to add user defined F4 help for s LDB field?

    Hi,      I am using PNPCE Logical Database for a program using the standard HR report category. But I want to have my own restricted F4 help for a particular field.Is it possible to override the standard LDB search help? I tried doing it , but I am g

  • Newest skype version doesn't work

    hi I hope this is in the right section.(I'm not sure) I noticed that in the new skype 4.2.0.13-2 the sound doesn't work. so I downgraded, but I would like to know if someone else has this problem and/or a different workaround (because I don't like do

  • Disabling scroll lock in New Imac keyboard

    Hello world, I'm recently using Office 2011 for Mac and I have a problem with excel. Accidentally I made a mac key combination and I disabled the scroll lock. I want to enable it again in order to move the cell selected using the arrow keys. I can no

  • Slices Made In PS CS5 "Break Up" When Trying To Embed Video

    Try and make this short and sweet. Have been searching and asking other places. I made a website in PS CS5, and exported slices, to Dreamweaver. When trying to embed Flash(Via HTML or Insert/Media), the video won't go "On" to the section/slice I'm tr

  • Script review

    I am new to scripting and have asked lots of "newbie" questions.  Would anyone be interested in doing a review of the attached script and providing feedback? The premise of the script is to put a caller directly into queue (after holiday, DOW, TOD ch