@Override public boolean isInBounds(int x, int y) { return image.isInBounds(x,y); }
private void changeFocus(MouseEvent e) { double omniX = e.getX()/scale; double omniY = e.getY()/scale; if( !imageFisheye.isInBounds((int)omniX,(int)omniY)) return; setPinholeCenter(omniX,omniY); renderPinhole(); repaint(); } };
private void check( int x , int y , float color0[] , int indexA, Planar<GrayF32> input , FastQueue<Edge> edges ) { if( !input.isInBounds(x,y) ) return; int indexSrc = input.startIndex + y*input.stride + x; int indexB = + y*input.width + x; float weight = 0; for( int i = 0; i < numBands; i++ ) { GrayF32 band = input.getBand(i); float color = band.data[indexSrc]; float diff = color0[i]-color; weight += diff*diff; } Edge e1 = edges.grow(); e1.sortValue = (float)Math.sqrt(weight); e1.indexA = indexA; e1.indexB = indexB; }
private void check( int x , int y , int color0[] , int indexA, Planar<GrayU8> input , FastQueue<Edge> edges ) { if( !input.isInBounds(x,y) ) return; int indexSrc = input.startIndex + y*input.stride + x; int indexB = + y*input.width + x; float weight = 0; for( int i = 0; i < numBands; i++ ) { GrayU8 band = input.getBand(i); int color = band.data[indexSrc]& 0xFF; int diff = color0[i]-color; weight += diff*diff; } Edge e1 = edges.grow(); e1.sortValue = (float)Math.sqrt(weight); e1.indexA = indexA; e1.indexB = indexB; }
private void check( int x , int y , float color0[] , int indexA, Planar<GrayF32> input , FastQueue<Edge> edges ) { if( !input.isInBounds(x,y) ) return; int indexSrc = input.startIndex + y*input.stride + x; int indexB = + y*input.width + x; float weight = 0; for( int i = 0; i < numBands; i++ ) { GrayF32 band = input.getBand(i); float color = band.data[indexSrc]; float diff = color0[i]-color; weight += diff*diff; } Edge e1 = edges.grow(); e1.sortValue = (float)Math.sqrt(weight); e1.indexA = indexA; e1.indexB = indexB; }
private void check( int x , int y , int color0[] , int indexA, Planar<GrayU8> input , FastQueue<Edge> edges ) { if( !input.isInBounds(x,y) ) return; int indexSrc = input.startIndex + y*input.stride + x; int indexB = + y*input.width + x; float weight = 0; for( int i = 0; i < numBands; i++ ) { GrayU8 band = input.getBand(i); int color = band.data[indexSrc]& 0xFF; int diff = color0[i]-color; weight += diff*diff; } Edge e1 = edges.grow(); e1.sortValue = (float)Math.sqrt(weight); e1.indexA = indexA; e1.indexB = indexB; }