Linda, yet again, I believe you're looking at treatments of Raul's largest
rectangle problem,  as discussed in the thread "Largest Rectangle"

qq is a randomised example of a list of widths or heights, depending on your
view,  of what might be regarded as a histogram or bar-diagram. Raul sought
a neat method for finding the maximum area over all embedded rectangles.

As I understand it, the diamond question concerns how to correctly identify
what is ideally (without data noise) a singly-connected pattern within a
rectangular window of pixels.

The noun qq which gives rise to 7030779 is not such an array.

Sorry,
Mike

On 29/06/2017 11:07, Linda Alvord wrote:
I hope this is the right thread.  Also this is my better tacit wih a hint to 
wgere it came from,  (Raul)

f=: 13 :'>./ (([: ([: >: i.) #)y)([: >./ [ * <./\)y'
    f qq
7030779
    f
[: >./ ] ([: >./ [ * <./\)~ [: ([: >: i.) #

Linda

-----Original Message-----
From: Programming [mailto:programming-boun...@forums.jsoftware.com] On Behalf 
Of Brian Schott
Sent: Wednesday, June 28, 2017 2:14 PM
To: Programming forum <programm...@jsoftware.com>
Subject: Re: [Jprogramming] cleanest diamond

Don,

I have been "thresholding" which I believe is the typical name for the process of converting an rgb 
image to a b&w image using the ideas I have read about in Cliff Reiter's book entitled, "Fractals, 
Visualization and J." In that book he defines the following terms and I use the "threshold"
110 below to *train* my playing card system.

avg =: +/ % #
wb_pal =: 110>avg"1 read_image jpath'~....'

To *use* my playing card system I have found that a similar threshold value is 
required but depends on the lighting system in the room.

Marshall's comments referred to "intensities" which I take to mean are the values 
returned by the avg"1 verb above, before that result is compared to
110 or whatever the threshold limiting value is. In this thread/conversation I was seeking a 
better way to determine that threshold limiting value. (I had missed his initial reference to 
intensities, which slowed my understanding of his approach. I have not confirmed with Marshall 
that avg"1 produces "intensities" but that is what I have assumed.)

Do you have some other measure of lighting that can be read from an image?
Something different or better than the avg"1 I am using?

Also, are you suggesting that this global assessment of the threshold value is 
unwise and that it needs to be done in patches around the image? If so, could 
you elaborate, please?

I have begun to use Marshall's idea but have been rather frustrated because 
although it seems to work to determine the value of the cards' suits, it is 
often not so good for determining the pips' values. I am still experimenting, 
but tentatively I am subtracting about 10 from the suggested threshold value 
from the diamonds.

My system is frustrating because I cannot create a physical situation where I 
can control the lighting and the positioning of each playing card so that the 
cards can be readily passed in front of the webcam one-at-a-time and accurately 
recognized. I am limiting myself to almost-free or already purchased objects I 
find around the house. This is all just for fun, not for profit.

​My current webcam is an apple iSight which sits on a pedestal and is connected 
to the cpu via a cable. It is very limited in its deployment/positioning 
flexibility but at least I can trigger a snapshot from my desktop computer with 
the Chrome browser. I own a clear plastic dual card deck tray but cannot think 
of any way to point the camera directly down to see the top card in the tray, 
for example. I guess I need to build a rig of some sort to hold the webcam 
above the deck tray. I think the better thing to do is use an ipad or iphone 
and its camera, but as of this date, there is no way to trigger the ipad camera 
from the web browser (I am using jhs, btw). Building a rig for an ipad/iphone 
would seem easier.
I don't do android, but that may be an alternative, except I don't believe 
android browsers can trigger the system camera either.

Well, that's undoubtedly much more that you (all) wanted to know.


On Wed, Jun 28, 2017 at 12:29 PM, Don Guinn <dongu...@gmail.com> wrote:

Are you losing information by applying the threshold to each point
without regard to the points around it? If most or all the points
around it are large values then it is more likely that the threshold
should be lower than if the point is surrounded by lower values. Also,
maybe look at the overall brightness of the image to help set the threshold.

--
(B=)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to