draco1023 / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

Add bool Highlight and color HighlightColor to IMotionProcessing #177

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
That's it really.

Original issue reported on code.google.com by ad...@activeunlimited.com on 28 Nov 2010 at 2:36

GoogleCodeExporter commented 9 years ago
No, it will never happen. This interface is not about highlighting – never 
was and never will be. If you don’t understand its idea, than learn it, but 
don’t try to damage it with such silly suggestions.

Original comment by andrew.k...@gmail.com on 28 Nov 2010 at 10:00

GoogleCodeExporter commented 9 years ago
jeez keep your hair on, how the hell is suggesting something "trying to damage 
it"? If you want people to donate to support aforge it would help if you were a 
bit more personable.

Original comment by ad...@activeunlimited.com on 28 Nov 2010 at 12:15

GoogleCodeExporter commented 9 years ago
>> how the hell is suggesting something "trying to damage it"?
I can explain. If suggestion is no way good and will not make any good to the 
interface, but will only make it bad, than this is called damage. Do you 
honestly understand the purpose of IMotionProcessing? I think no, if you made 
such suggestion. There may be tons of different image processing routines, 
which have nothing to do with highlighting. If you have your own specific 
implementation, which does highlighting, then have a property in your class. 
But I am not going to spoil the interface and force all implementations to 
implement the property they don't need.

Original comment by andrew.k...@gmail.com on 28 Nov 2010 at 12:22

GoogleCodeExporter commented 9 years ago
"If suggestion is no way good and will not make any good to the interface, but 
will only make it bad, than this is called damage."

It's only damage if it's implemented. As it stands it's just a suggestion. The 
reason I suggested it is that _every_ type of IMotionProcessing included in the 
framework has a HighlightColor that isn't exposed by the interface which means 
I have to do this:

switch (_camobject.detector.postprocessor)
                    {
                        case "Grid Processing":
                            _motionProcessor = new GridMotionAreaProcessing();
                            ((GridMotionAreaProcessing)_motionProcessor).HighlightColor = System.Drawing.ColorTranslator.FromHtml(_camobject.detector.color);
                            break;
                        case "Object Tracking":
                            _motionProcessor = new BlobCountingObjectsProcessing();
                            ((BlobCountingObjectsProcessing)_motionProcessor).HighlightColor = System.Drawing.ColorTranslator.FromHtml(_camobject.detector.color);
                            break;
                        case "Border Highlighting":
                            _motionProcessor = new MotionBorderHighlighting();
                            ((MotionBorderHighlighting)_motionProcessor).HighlightColor = System.Drawing.ColorTranslator.FromHtml(_camobject.detector.color);
                            break;
                        case "Area Highlighting":
                            _motionProcessor = new MotionAreaHighlighting();
                            ((MotionAreaHighlighting)_motionProcessor).HighlightColor = System.Drawing.ColorTranslator.FromHtml(_camobject.detector.color);
                            break;
                        case "None":
                            break;
                    }

... instead of just _motionProcessor.HighlightColor = ...

But dude, seriously just a "no" would have sufficed.

Original comment by ad...@activeunlimited.com on 28 Nov 2010 at 12:40

GoogleCodeExporter commented 9 years ago
1) This property does not belong to this interface.
2) Although we have all image processors doing some sort of highlighting now, 
it does not mean that in the future we'll not have another processor, which 
does not any highlighting at all. Anyway, this property is simply no part of 
the interface in its idea.

Original comment by andrew.k...@gmail.com on 28 Nov 2010 at 12:45

GoogleCodeExporter commented 9 years ago
OK cool got it. That wasn't so hard was it? :)

Original comment by ad...@activeunlimited.com on 28 Nov 2010 at 12:47

GoogleCodeExporter commented 9 years ago
No, not that much ;)

Original comment by andrew.k...@gmail.com on 28 Nov 2010 at 12:49