0

I've been working on a pixel img extract by using gauss filter from raw pic. By searching online I couldn't find any solution to detect how many cluster center or contour lines center from such pixels.

A similar answer from here provided by @honestduane solved nothing, but the line "Just use a Non-Euclidean http://en.wikipedia.org/wiki/Haversine_formula based algorithm to first look at where they are spawning to find the number of objects within a set gap size" is quiet interesting.

I still try to find a way to detect the cluster center of each mountain in the pic, please help me!

Add:

pika_raw_jpg

pika_fingerprint_demo

basic_extract_py

Ink
  • 11
  • 1
  • 4
  • This looks like a quite complicated computer vision problem (though, unrelated to noise generation as far as I can see). Could you approach this from the other end - i.e., make the image better by improving the extraction algorithm? – Nico Schertler Nov 06 '18 at 11:48
  • @NicoSchertler I can modify the radius of extraction func but the image is still much constructed by individual pixels. I'm trying with some other algorithms like using skimage.transform.hough_circle(image, radius) and http://sklearn.apachecn.org/cn/0.19.0/auto_examples/cluster/plot_face_segmentation.html#sphx-glr-auto-examples-cluster-plot-face-segmentation-py like this, but seems i cant link them correctly, any idea to link them? – Ink Nov 06 '18 at 12:55
  • Please post “raw pic”. What you show doesn’t look like the result of a Gauss filter. What kind of image is it? How is it generates? What does it represent? These things are relevant when trying to solve such a problem. – Cris Luengo Nov 06 '18 at 13:40
  • @CrisLuengo G(x) = F(x) - LPF(x), LPF is gauss filter in this question. The pic is F(x) - G(x) – Ink Nov 06 '18 at 14:05
  • I need an algorithm to "fix" the Discrete points back to continuous Contour lines, or some other clever way to directly calculate the cluster numbers and sizes. – Ink Nov 06 '18 at 14:08
  • 1
    Like @Cris said, please show the original image. There might be easier ways starting from there. How did you handle negative values in your subtractive model? – Nico Schertler Nov 06 '18 at 14:40
  • If `G=F-LPF`, and you showed `F-G=F-(F-LPF)=LPF`, then what you're showing should be the application of a Gauss filter to `F`. But it doesn't look like it. As @Nico suggested, there might be an issue with clipping negative values. Whatever you've done, there are better ways to get iso-intensity lines (contour lines). – Cris Luengo Nov 06 '18 at 15:09
  • @CrisLuengo thx for helping, I've update the raw data and script to the server so u can download. g(x,y) = f(x,y) - LPF(f(x,y)) + mean(LPF(f(x,y))) – Ink Nov 06 '18 at 15:39
  • @NicoSchertler g(x,y) = f(x,y) - LPF(f(x,y)) + mean(LPF(f(x,y))) I'd rather consider this as a math problem cause simple dilate kernel may not work for re-construct Contour curve. I also find http://www.mi.auckland.ac.nz/DATA/CCV/books/KR/pdf-LectureNotes/22slides.pdf but my goal is to find these clusters center point and the clusters' size, so I don't think its a cv problem. I'm a phd working on image fingerprint and hope this cluster size parameter would help. THX a lot for consideration! THX! – Ink Nov 06 '18 at 15:43
  • I don't see how you go from `pika_demo.jpg` to `pika_demo_fgp.png` with the code you posted. I do see that you are using `uint8` arithmetic all throughout, so you're getting all sorts of overflow and underflow. I don't know how the operations you use deal with that, if the upper bits get dropped or if it is saturated arithmetic. – Cris Luengo Nov 06 '18 at 16:00
  • @CrisLuengo rtn_matrix = getmatrixfromimg(greyscale_GaussianBlur) - getmatrixfromimg(mean_greyscale_GaussianBlur) Image.fromarray(rtn_matrix).save(str(radius)+'_pika_fgp.png') Look at this line: g(x,y) = f(x,y) - LPF(f(x,y)) + mean(LPF(f(x,y))) – Ink Nov 06 '18 at 16:08

0 Answers0