Brand new edge overlay. Please test. - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

Brand new edge overlay. Please test.

  • 36 Replies
  • 11747 Views
*

Offline ultimA

  • ***
  • 137
Re: Brand new edge overlay. Please test.
« Reply #10 on: 22 / August / 2010, 17:49:12 »
Advertisements
Now, i can't save, because the edge data disappears where i press the menu button, so no overlay to save.
This is because you have to be in Frozen mode to save. Just take a shot and the overlay will be in memory after that even when not displayed on the screen, as long as you are in Frozen mode. Then you can save the image.

Again, this is a small behavioral change. I think this is more logical and more consistent, but I am open to other suggestions.

P.s.: If you make diff, try to step one directory inner...
Sorry for that, ok. As a workaround until the next posted diff, you can just use patch -p1 to overcome that.
« Last Edit: 22 / August / 2010, 17:55:24 by ultimA »

Re: Brand new edge overlay. Please test.
« Reply #11 on: 23 / August / 2010, 03:27:20 »
I was already thinking about a menu option that would make the overlay display continuously on the screen without having to press the shutter button. So this seems like a good suggestion. However, I personally do not think that that this edge overlay is suitable for focus adjustments. This is because the edges drawn are too thick. I use it for panoramas and stereo photographing, not for macrophotography. Maybe, if you could try out the patch, can you tell me if it's suitable for the macro-users?

The whole reason I opened this topic is because I want to perfect the patch before submitting it for inclusion in the trunk. If you have *any* suggestions, please don't hesitate to post.

Thanks, but I can't test it until someone else compiles it. Never got into that facet of CHDK. If you had an option to change the width of the edge detection, could it then be used for precision manual focusing?

*

Offline ultimA

  • ***
  • 137
Re: Brand new edge overlay. Please test.
« Reply #12 on: 23 / August / 2010, 10:10:20 »
Thanks, but I can't test it until someone else compiles it. Never got into that facet of CHDK. If you had an option to change the width of the edge detection, could it then be used for precision manual focusing?

The edge detection is based on the small-resolution live view of the camera. Even if something seems to be in focus in the live view, it is possible that it is far from perfect in the final photo, because of its much lower resolution. So I don't think that it is good for precision focus tuning, even if the edges are drawn thin.

But if you'd like to try it, I'd happily compile a version for your camera, if you tell me its model.

*

Offline neszt

  • ***
  • 174
Re: Brand new edge overlay. Please test.
« Reply #13 on: 23 / August / 2010, 14:46:51 »
1. Your last patch gives me the following error:
Code: [Select]
edgeoverlay.c:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
edgeoverlay.c: In function 'ensure_allocate_imagebuffer':
edgeoverlay.c:51: error: 'edgebuf' undeclared (first use in this function)
edgeoverlay.c:51: error: (Each undeclared identifier is reported only once
edgeoverlay.c:51: error: for each function it appears in.)
I not examined it yet dealied, but something must wrong, coz i tried your previous patch and that worked well.

2. Now, the patch base dir is correct.

Edit: Fixed linenumbers in code section.
« Last Edit: 23 / August / 2010, 14:49:55 by neszt »


*

Offline ultimA

  • ***
  • 137
Re: Brand new edge overlay. Please test.
« Reply #14 on: 23 / August / 2010, 15:55:50 »
Two files were missing from the patch because of bad hand edit. Diff updated in original post.

*

Offline neszt

  • ***
  • 174
Re: Brand new edge overlay. Please test.
« Reply #15 on: 23 / August / 2010, 17:14:01 »
1. The revision 924 can be compiled with your last patch.

2. Tested panorama mode, ok.

3. I still can't save. Sorry, i don't understand "This is because you have to be in Frozen mode to save.". I tried even to take a shot.

Don't forget, i'am not an edge detect guru, i just on the way to release the new SX20 1.00F firmware with your new memory efficent edge detection, to let the games back again :)

Re: Brand new edge overlay. Please test.
« Reply #16 on: 23 / August / 2010, 21:34:36 »
But if you'd like to try it, I'd happily compile a version for your camera, if you tell me its model.

Thanks! I've been using an S3 lately. Maybe if I explained more how this works, because I use this manual focusing technique on any camera that has an EVF, you might be able to translate this into an edge-detection option or settings. When looking in any EVF, especially for macro photography, because it has such a shallow DOF most everything is out of focus, all edges, all textures, all details are blurred. Except for those small areas which are in focus. I watch to see a slight "shimmering" in the display pixels, where they will rapidly change their intensity as fine details pass from 1 display pixel to the next. (An edge-width of 1 if you will.) This is how I see that this edge-detection could be tweaked to detect this and color-highlight it, since it has the capability of having a continuous mode now. This scintillation=best-focus isn't as easy to see in the lower resolution EVFs of some of these Powershot cameras, but in others with slightly more resolution this pixel scintillation effect becomes obvious. It's like using an SLR's micro-prism focusing screen in reverse. You can see it when it happens in these Powershot EVF's, but only with some "seeing" practice.

*

Offline ultimA

  • ***
  • 137
Re: Brand new edge overlay. Please test.
« Reply #17 on: 24 / August / 2010, 00:44:24 »
I still can't save.

I double checked and saving works. I can only think of two problems:
1) You are not in Frozen mode. How can you tell? If you are in Frozen mode, when the overlay is displayed (for example during half-press) the message "Frozen" is on the screen. If this text is displayed, you are in Frozen mode and you should be able to save. In Frozen mode the edge overlay does not get updated during half-press, it is only being displayed.

2) The second reason could be, you only *think* that it is not being saved, but in reality it is saved. Since I have added 2 extra menu options to the edge overlay menu, the menu is bigger and you cannot see the "Saved to <filepath>" text on the screen anymore because it is occluded by the menu. (If you look carefully you can spot it just above the menu title). I will try to think of something so that the user will be able to see this message.

BTW, if you are trying to make a new release, you might be interested that I am trying to make the SX20 a first class CHDK citizen and there will be soon other patches coming too. It is your decision whether you release now or wait. I, myself, will not be making any more binary releases until I have finished everything.


*

Offline ultimA

  • ***
  • 137
Re: Brand new edge overlay. Please test.
« Reply #18 on: 24 / August / 2010, 00:49:10 »
...

Here is build for you: http://www.mediafire.com/?23dfic9382dxnzm
Please tell me if this is usable for macro or do you need thinner lines? (most probably you do)
I cannot guarantee anything as the line thickness is kind of a property of the Sobel edge detection algorithm. Other algorithms are either of worse quality or are much more CPU-hungry. But I will see what I can do.

Re: Brand new edge overlay. Please test.
« Reply #19 on: 24 / August / 2010, 06:52:53 »
Thanks very much for doing that for me. I just tested it. It does indeed work on some subjects, but on others, where there are even higher contrasting edges more out of focus, it detects those too. Not knowing much about that edge-detection algorithm, I would be in error of trying to suggest anything further, I think. Is there a way you could put in a menu option for line-thickness so this could be experimented with? Is that for the edge thickness being detected? Or only for the size of the lines being displayed? If the former, then it might just be the solution. If it's just for the display thickness, then it won't change anything for this intended use. I found that if I set the threshold quite high (around 180 or so), it does a better job at rejecting some of the out-of-focus edges. Perhaps combining that with thinner edge-detection might just act as a very effective precision manual focusing aid.

An easy way to test this is by putting a high-diopter (+6 or more) close-up filter on the camera. Then zooming in about halfway so you get a rather shallow DOF. Then try focusing at an angle to any surface with some texture (so the shallow DOF only cuts across part of the textured surface). You'll see the edge detection lines only highlighting those areas in focus. But as I said, if I put something like a black and white writing-pen in the field of view (something of even more contrast), then the lines also follow the edges of the pen into the very out of focus areas. Which makes me suspect that the algorithm being used to detect edges really can't be used effectively for this purpose. It appears to detect anything with high contrasting regions even if out of focus, rather than only those that are finer and in focus.

 

Related Topics