Jump to content

HELP US !


Recommended Posts

Hello friends I am looking for a programmer

to helt the  moder in the community.

or a program that can help us a lot .. to know where it is.

The program must be able to write consecutive numbers in the fields.

I wrote this by hand ..

and with about 1500-2500 parts this is a very time-consuming job.

 

if you do it the moder will kiss your feet! :new_russian:

 

 

 

 

2020-11-17 16_14_30-Panther_T213_&1.xcf-10.0 (RGB-Farben 8-Bit-Gamma-Ganzzahl, sRGB IEC61966-2.1, 68.png

Edited by Tomi_099
  • Like 1
Link to post
Share on other sites

Hi!

 

The hardest part of the solution is clearly defining the problem.

 

Some questions:

  1. What is the purpose of this numbering for the final user?
  2. Is the program supposed to find polygons, and all the polygons in the image?
  3. Can you ensure the background color? Is it always black, for instance?
  4. What is the smallest possible size of a polygon that needs to have a number assigned?
  5. Are the sequential numbers assigned arbitrarily, or is there some path or proximity rule to assign them?
  6. What file format are the images originally in?
  7. What file format are the final images suppose to be in?
  8. How many files do you typically need to process in one usage of the program? One at a time, or in batches?
  9. How fast do you need this to run?
  10. When do you need it done?

 

Edited by J2_Bidu
  • Thanks 1
Link to post
Share on other sites

Thank you for the unexpectedly quick response :good:

! I will try to answer all of your questions ..

if you have any further questions don't be afraid.

I just hope that I understood everything!

 

 

 

1.What is the purpose of this numbering for the final user?
--------
to quickly find and localize the objects on the mod.
to make the grinding homogeneous
-------------
2.Is the program supposed to find polygons, and all the polygons in the image?
---------

Yes !
---------
3.Can you ensure the background color? Is it always black, for instance?
---------

Yes
------------------------------
4.What is the smallest possible size of a polygon that needs to have a number assigned?
------

Arial
8px / unfortunately not readable
so 9px - 12px is suitable
------------------
5.Are the sequential numbers assigned arbitrarily, or is there some path or proximity rule to assign them?
Approximate rule would be that the numbers are concentrated. so an example catch the top left and not jump to the bottom right.

to keep the numbers low, it would be good if you follow a scheme.
example.
1-100
A1-A100
B1-B100
..
Z1-Z100
----
if not sufficient
a1-a100
b1-b100
.....
or
a
1 - a
    1
    0
    0
among themselves
.....................

for the smallest parts
x - xxx (or below each other)
- (-) --- (or under each other)

-------------------------------------
6. What file format are the images originally in?
-----------------
as png they are user-friendly.
the end product is DDS (5)
---------
7.What file format are the final images suppose to be in?

 

DDS
----------
8. How many files do you typically need to process in one usage of the program? One at a time, or in batches?
----
minimal .. approx. 1000
Per picture ..
that depends on the manufacturer who will deliver more mods to us in the future.
---------
9.How fast do you need this to run?
--
speed remains with the developer
-------------
10. When do you need it done?
--
whenever it comes to an end.
it is a great help for the modders.
however, it should be used several times.
for different positions.

 

For the beginning I have attached the Panter REFerenz pictures. :good:

http://www.mediafire.com/view/lvyb6qtzq4u50es/PzB-D_REF%261%231.png/file

 

http://www.mediafire.com/view/pvfsrok7nif13dm/PzV-D_REF%261.png/file

-----------------------------------------------

 

 

EXEMPL

 

2.Is the program supposed to find polygons, and all the polygons in the image?

 

 

A.jpg

 

---------------------------------

 

here the x and (+)  arrangement for very small parts also possible below

x.jpg

B.jpg

 

 

 

---------------------------------

 

vertical arrangement ..if possible! A12

3_LI.thumb.jpg.f0af44c26c608aefd04f2edcace7af3c.jpg

C.jpg

 

 

4.What is the smallest possible size of a polygon that needs to have a number assigned?

 

* 9 px *

2.jpg

 

 

to * 12px *

If numbers fall into a one field like here  .. the 16 / 27 / x16 .. it is not important .. on the contrary, you can define the side .. or it is left or right .. sometimes the poligons are twisted from developper.

doppelt.jpg

 

 

Edited by Tomi_099
  • Like 1
  • Thanks 1
Link to post
Share on other sites

Hi there! Have been kind of busy but I have began to taken a look at this problem. Can't make any promises, since free time isn't much. I'm mostly a .Net Framework/C# programmer so I will try to address the core of the problem using this technology. The critical thing apparently is the image pattern recognition. I have found a free library which may help solve it. There are secondary issues regarding the appropriate handling of the image file formats you mention, and also the mass handling of the files. But no point worrying about that if the 1st problem is not solved.

 

I'll let you know how it's going.

Edited by J2_Bidu
  • Thanks 1
Link to post
Share on other sites
17 hours ago, J2_Bidu said:

Hi there! Have been kind of busy but I have began to taken a look at this problem. Can't make any promises, since free time isn't much. I'm mostly a .Net Framework/C# programmer so I will try to address the core of the problem using this technology. The critical thing apparently is the image pattern recognition. I have found a free library which may help solve it. There are secondary issues regarding the appropriate handling of the image file formats you mention, and also the mass handling of the files. But no point worrying about that if the 1st problem is not solved.

 

I'll let you know how it's going.

 

 

Hi .. I'm very happy that you started .. do what you can!  :friends:
if it is not a secret,

you can present the source code and your problem here on the communiti ..

I think there are some of your colleges here who can support you ..

only they are a little shy.

 

Ps: And then I could imagine that Jason could have work for you too! ;)

Edited by Tomi_099
  • Haha 1
Link to post
Share on other sites

Here's the kind of result I'm getting in my shape detection efforts (which so far means trying to use what the library provides out-of-the-box).

(I grabbed your last image, took out most of the numbers and processed it)

 

Challenges I see: the frontier between shapes does not always consist of a black space; the right place to insert a number is not necessarily the geographical middle of the shape; things like that.

sample.png

Link to post
Share on other sites

The current state of things... as you can see, some odd things happening; phantom detections; this may have to do with sensitivity to small changes in color, or other assumptions about what constitutes an independent shape, still hard to tell what's happening. P.S.: that vertical "58" is a leftover from your original.

 

sample.JPG.ff2ab6c81474a01526cfed68696839e1.JPG

Edited by J2_Bidu
Link to post
Share on other sites

Assuming the background is black and every coloured "island" is separate the following logic would be much simpler than shape detection.

 

Parse image left to right top to bottom:

 

colour  (matrix holding the image)

island_map  (2D matrix (no colour  dim) of the same size as the image filled with 0s)

 

island_counter = 1

 

for x in range(width):

   for y in range(height):

       if colour[x,y] == black:  ## if we are in black, just move on

                skip

       else:

               if any island_map(around x,y) is not 0:  ## we are on a non-black pixel, need to assign the "island number" to it now

                        island_map[x,y] =  the neighbouring value on the island map   ## some neighbours already have an island number, so we assign the same one here (can't have conflict here under assumption)

               else:

                       island_map[x,y] = island_counter  ## no neighbours but we are on coloured pixel, therefore its a new island

                       island_counter += 1  ## next "new" island will need to be incremented.

 

 

 

 

 

 

 

The output of the above is a 2D matrix with "numbered" islands.

Edited by [110]xJammer
Link to post
Share on other sites

No matter which symbols you use,

the only important thing is that you recognize them on the model.

it could also look like this     sss1      §§ /     xx1    $$1      they can also be arranged under one another.

 

It is not always advantageous to place it in the middle,

especially with circles, the middle is covered by another object.

 

20201122023545_1.jpg

To understand;

these black parts will later be made invisible! .. so there are different versions! .. but to find them i need your services!

 

20201125223334_1.jpg

Here you can also see the construction lines

 

 

 

 

 

 

Here a part has already been made invisible .. now come the angles and the screws,

20201121011530_1.jpg

Good work friends keep it up !! :good:

Edited by Tomi_099
  • Like 1
Link to post
Share on other sites
17 hours ago, [110]xJammer said:

Assuming the background is black and every coloured "island" is separate the following logic would be much simpler than shape detection.

 

Parse image left to right top to bottom:

 

colour  (matrix holding the image)

island_map  (2D matrix (no colour  dim) of the same size as the image filled with 0s)

 

island_counter = 1

 

for x in range(width):

   for y in range(height):

       if colour[x,y] == black:  ## if we are in black, just move on

                skip

       else:

               if any island_map(around x,y) is not 0:  ## we are on a non-black pixel, need to assign the "island number" to it now

                        island_map[x,y] =  the neighbouring value on the island map   ## some neighbours already have an island number, so we assign the same one here (can't have conflict here under assumption)

               else:

                       island_map[x,y] = island_counter  ## no neighbours but we are on coloured pixel, therefore its a new island

                       island_counter += 1  ## next "new" island will need to be incremented.

 

 

 

The output of the above is a 2D matrix with "numbered" islands.

 

Hm, I can't see how this would capture, say, object 53 on Tomi's post of the 18th Nov. Or how a feasible place for number placement can be found. Or how transition from colored to (different) colored is treated as different "island".

 

By the way, the library I'm using (Accord) allows automatic calculation of the "center of gravity" of a shape, but this doesn't help in placing the number on, say, a ring.

 

P.S.: If anyone's interested on the actual code I can put it on github. I've just been too lazy to do it, don't use it regularly.

Edited by J2_Bidu
Link to post
Share on other sites
25 minutes ago, J2_Bidu said:

 

Hm, I can't see how this would capture, say, object 53 on Tomi's post of the 18th Nov.

 

 

Good point, I mostly based the suggestion on the initial picture. However this can be easily solved by simply running a recursion as soon as "new pixel" is found, i.e.

 

while neighbouring_pixels are not black and not marked:

     mark neighbouring_pixels as the same number

     do the same for these pixels now.

 

(or if you prefer doing this without recursion just re-scan the picture until you get a full row that does not satisfy the condition)

25 minutes ago, J2_Bidu said:

Or how a feasible place for number placement can be found

 

 

once you have island_map sorted correctly, for each island you could simply convolve the matrix with a square of the required size. As a result you'll get a matrix of positions where the numbers would fit. (that way you could even check which island has space for 1 or 2 or 3 digits etc). Centre of gravity would not work as shape like the one you mentioned (circle) has something else there entirely.

 

25 minutes ago, J2_Bidu said:

Or how transition from colored to (different) colored is treated as different "island".

 

 

unsure what are you trying to ask here. Colour of the island does not matter, as long as its not interrupted by black it belongs to the same "island" as per assumption

 

25 minutes ago, J2_Bidu said:

By the way, the library I'm using (Accord) allows automatic calculation of the "center of gravity" of a shape, but this doesn't help in placing the number on, say, a ring.

 

yup, see the convolution option above that I mentioned

25 minutes ago, J2_Bidu said:

P.S.: If anyone's interested on the actual code I can put it on github. I've just been too lazy to do it, don't use it regularly.

 

not me. I'm happy to help with the logic but I wouldn't touch code for this sort of problem.

Edited by [110]xJammer
Link to post
Share on other sites
1 hour ago, [110]xJammer said:

unsure what are you trying to ask here. Colour of the island does not matter, as long as its not interrupted by black it belongs to the same "island" as per assumption

 

I believe the assumption is wrong :)... 17, 18, 19 on Tomi's same image, they are actually contiguous, not even the color changes; actually I don't think I quite understood the whole 16, x16, 27 thing... why were all those three numbers put into what could otherwise be considered a single thing to be tagged?

Edited by J2_Bidu
Link to post
Share on other sites
58 minutes ago, J2_Bidu said:

 

I believe the assumption is wrong :)... 17, 18, 19 on Tomi's same image, they are actually contiguous, not even the color changes; actually I don't think I quite understood the whole 16, x16, 27 thing... why were all those three numbers put into what could otherwise be considered a single thing to be tagged?

 

Yas a mistake from me with the 3 numbers .. :russian_ru:

but has a small advantage ..

if a one number is in the middle .. :mda:

I don't know where left and right is ..on the model ..

with erroneous 3 numbers I know what is left and what is right attached to the model. :crazy:

 

.....

Another important question is !

how do I find the numbers very quickly on the image.. the first one .. there are the eyes  :crazy:.. and then?

 

Edited by Tomi_099
Link to post
Share on other sites
1 hour ago, J2_Bidu said:

 

I believe the assumption is wrong :)... 17, 18, 19 on Tomi's same image, they are actually contiguous, not even the color changes; actually I don't think I quite understood the whole 16, x16, 27 thing... why were all those three numbers put into what could otherwise be considered a single thing to be tagged?

 

 

first image 113 and 112  vs. lone 73 meant to me that using them as direct reference is meaningless. Therefore the assumption that I provided seemed reasonable (every "island" of pixels fully separated by black is considered as 1)

Link to post
Share on other sites
On 11/27/2020 at 10:45 PM, [110]xJammer said:

 

 

first image 113 and 112  vs. lone 73 meant to me that using them as direct reference is meaningless. Therefore the assumption that I provided seemed reasonable (every "island" of pixels fully separated by black is considered as 1)

 

 

There is no logic about the connection between the numbers ..

in this status one cannot yet make statements.

the only important thing is ..

a small family education ..if possible -

ongoing numbers -

and no bursts of number .. makes searching on the image more difficult. :good:

Link to post
Share on other sites

Not sure I will have time to help and you seem to be on the right track, but in case you don't know, there is a nice library called opencv that provides a lot of robust image recognition tools. The "findcontours" fonction could do the job and I guess it's possible to automatically find the center of shapes for convex ones at least.  I will follow the topic and try to help if I can. @J2_Bidu for C# : http://www.emgu.com/wiki/index.php/Main_Page

  • Like 1
  • Thanks 1
Link to post
Share on other sites
  • 4 weeks later...

Have a bit more time now. I'm a bit stumped by the fact that finding the appropriate place to write the label in each polygon is pretty hard. Seems to go well beyond the capabilities of the library, and its probably beyond the effort I'm able and willing to put here.

 

I'd like to go back to the requirements... do you really need to have a label assigned to each polygon? Or do you just need a way to find out in a rendered 3d object where some part you're looking at is in relation to the original skin file? Because one way to maybe achieve thus might be to just fill the whole skin left to right top to bottom with evenly spaced labels. Not sophisticated, I know... and might interfere too much with the visuals, right?...

  • Upvote 1
Link to post
Share on other sites
On 12/28/2020 at 4:51 PM, J2_Bidu said:

Have a bit more time now. I'm a bit stumped by the fact that finding the appropriate place to write the label in each polygon is pretty hard. Seems to go well beyond the capabilities of the library, and its probably beyond the effort I'm able and willing to put here.

 

I'd like to go back to the requirements... do you really need to have a label assigned to each polygon? Or do you just need a way to find out in a rendered 3d object where some part you're looking at is in relation to the original skin file? Because one way to maybe achieve thus might be to just fill the whole skin left to right top to bottom with evenly spaced labels. Not sophisticated, I know... and might interfere too much with the visuals, right?...

 

 

Hello,

thank you for your contribution which is very important to us. :good:

I don't know if I understood correctly ..

the result before is good, even if there are several numbers in one field ..

but they should not repeat themselves ..

if yes.. then

maybe in a different color like blue / red.

You can cover the fields with different color patterns in order to recognize you on the playing model.

 

Maybe I could try a test on a Sherman Skin?  ...

Edited by Tomi_099
Link to post
Share on other sites

Hi @Tomi_099,

 

Well, maybe I'm complicating things... don't know what you expect.

 

These are my concerns:

  1. Not all shapes are detected;
  2. Numbers are placed in the "middle point of the figure", whether that middle point is part of the figure or not (consider an L-shaped figure for example).

For me, these are killers.

Link to post
Share on other sites
On 12/31/2020 at 2:29 PM, J2_Bidu said:

Hi @Tomi_099,

 

Well, maybe I'm complicating things... don't know what you expect.

 

These are my concerns:

  1. Not all shapes are detected;
  2. Numbers are placed in the "middle point of the figure", whether that middle point is part of the figure or not (consider an L-shaped figure for example).

For me, these are killers.

 

Hello, a good successful and healthy 2021 for you and your family.

 

For me this is a success that you have achieved.

My friend you save us 3/4 of the work,

the rest we have to insert by hand.

But a very great relief!

Thanks !

 

  • Like 1
Link to post
Share on other sites
  • 4 weeks later...
  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...